/*
* File: math_atom.C
- * Purpose: Wrapper for MathInset *
+ * Purpose: Wrapper for MathInset *
* Author: André Pönitz
* Created: July 2001
*
#include <config.h>
-#ifdef __GNUG__
-#pragma implementation
-#endif
#include "math_atom.h"
#include "math_inset.h"
-#include "support/LAssert.h"
#include <utility>
-using std::swap;
-
-
MathAtom::MathAtom()
: nucleus_(0)
{}
{}
-MathAtom::MathAtom(MathAtom const & p)
- : nucleus_(p.nucleus_ ? p.nucleus_->clone() : 0)
+MathAtom::MathAtom(MathAtom const & at)
+ : nucleus_(at.nucleus_ ? at.nucleus_->clone() : 0)
{}
-void MathAtom::operator=(MathAtom const & p)
+void MathAtom::operator=(MathAtom const & at)
{
- if (&p == this)
+ if (&at == this)
return;
- MathAtom tmp(p);
- swap(tmp.nucleus_, nucleus_);
+ MathAtom tmp(at);
+ std::swap(tmp.nucleus_, nucleus_);
}
{
delete nucleus_;
}
-
-
-void MathAtom::reset(MathInset * p)
-{
- if (p == nucleus_)
- return;
- delete nucleus_;
- nucleus_ = p;
-}
-
-
-MathInset * MathAtom::nucleus() const
-{
- lyx::Assert(nucleus_);
- return nucleus_;
-}
-
-
-MathInset * MathAtom::operator->() const
-{
- return nucleus();
-}