The Gnome Chemistry Utils  0.14.0
mesomery-arrow.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  * GChemPaint library
5  * mesomery-arrow.h
6  *
7  * Copyright (C) 2004-2010 Jean Bréfort <jean.brefort@normalesup.org>
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License as
11  * published by the Free Software Foundation; either version 3 of the
12  * License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
22  * USA
23  */
24 
25 #ifndef GCHEMPAINT_MESOMERY_ARROW_H
26 #define GCHEMPAINT_MESOMERY_ARROW_H
27 
29 #include "arrow.h"
30 
31 namespace gcp {
32 
33 class Mesomery;
34 class Mesomer;
35 
38 class MesomeryArrow: public Arrow
39 {
40 public:
47  MesomeryArrow (Mesomery* mesomery);
51  virtual ~MesomeryArrow ();
52 
59  xmlNodePtr Save (xmlDocPtr xml) const;
66  bool Load (xmlNodePtr node);
70  void AddItem ();
74  void UpdateItem ();
81  void SetStartMesomer (Mesomer *mesomer) {m_Start = mesomer;}
85  Mesomer* GetStartMesomer () {return m_Start;}
92  void SetEndMesomer (Mesomer *mesomer) {m_End = mesomer;}
96  Mesomer* GetEndMesomer () {return m_End;}
100  void Reverse ();
101 
105  std::string Name ();
106 
107 private:
108  Mesomer *m_Start, *m_End;
109 };
110 
111 } // namespace gcp
112 
113 #endif // GCHEMPAINT_MESOMERY_ARROW_H