1 /** 2 * \file MathAtom.cpp 3 * This file is part of LyX, the document processor. 4 * Licence details can be found in the file COPYING. 5 * 6 * \author André Pönitz 7 * 8 * Full author contact details are available in file CREDITS. 9 */ 10 11 #include <config.h> 12 13 #include "MathAtom.h" 14 #include "InsetMath.h" 15 16 using namespace std; 17 18 namespace lyx { 19 20 MathAtom(InsetMath * p)21MathAtom::MathAtom(InsetMath * p) 22 : nucleus_(p) 23 {} 24 25 MathAtom(MathAtom const & at)26MathAtom::MathAtom(MathAtom const & at) 27 : nucleus_(at.nucleus_ ? static_cast<InsetMath*>(at->clone()) : nullptr) 28 {} 29 30 operator =(MathAtom const & at)31MathAtom & MathAtom::operator=(MathAtom const & at) 32 { 33 // copy then move-assign 34 return operator=(MathAtom(at)); 35 } 36 37 38 } // namespace lyx 39