]> git.lyx.org Git - lyx.git/blob - src/mathed/math_atom.C
rename commandtags.h to lfuns.h and renumber/cleanup. Rebuild the tree !
[lyx.git] / src / mathed / math_atom.C
1 /*
2  *  File:        math_atom.C
3  *  Purpose:     Wrapper for MathInset *
4  *  Author:      André Pönitz
5  *  Created:     July 2001
6  *
7  *  Copyright: 2001 The LyX team
8  *
9  *   Version: 1.2.0
10  *
11  *   You are free to use and modify this code under the terms of
12  *   the GNU General Public Licence version 2 or later.
13  */
14
15 #include <config.h>
16
17
18 #include "math_atom.h"
19 #include "math_inset.h"
20
21 #include <utility>
22
23
24 MathAtom::MathAtom()
25         : nucleus_(0)
26 {}
27
28
29 MathAtom::MathAtom(MathInset * p)
30         : nucleus_(p)
31 {}
32
33
34 MathAtom::MathAtom(MathAtom const & at)
35         : nucleus_(at.nucleus_ ? at.nucleus_->clone() : 0)
36 {}
37
38
39 void MathAtom::operator=(MathAtom const & at)
40 {
41         if (&at == this)
42                 return;
43         MathAtom tmp(at);
44         std::swap(tmp.nucleus_, nucleus_);
45 }
46
47
48 MathAtom::~MathAtom()
49 {
50         delete nucleus_;
51 }