Computer Assited Medical Intervention Tool Kit  version 3.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
AtomProperties.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2014 UJF-Grenoble 1, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 
26 #ifndef ATOMPROPERTIES_H
27 #define ATOMPROPERTIES_H
28 
29 #include "BasicAtomProperties.h"
30 
46 public:
49  init();
50  };
51  AtomProperties(PhysicalModel *p, xmlNodePtr node) : BasicAtomProperties(p, node) {
52  init();
53  };
54  AtomProperties(PhysicalModel *p, const unsigned int ind) : BasicAtomProperties(p, ind) {
55  init();
56  };
57  AtomProperties(PhysicalModel *p, const double pos[3]) : BasicAtomProperties(p, pos) {
58  init();
59  };
60  AtomProperties(PhysicalModel *p, const unsigned int ind, const double pos[3]) : BasicAtomProperties(p, ind, pos) {
61  init();
62  };
63  virtual ~AtomProperties();
64 
66  void xmlPrint(std::ostream &);
67 
69  void setMyCustomProperty1(const int);
70  int getMyCustomProperty1() const;
71 
72  void setMyCustomProperty2(const std::string);
73  std::string getMyCustomProperty2() const;
74 
75 
76 protected:
77 
78  virtual void init();
80  std::string myCustomProperty2;
81 
82 };
83 
84 // inlines
85 inline void AtomProperties::setMyCustomProperty1(const int value) {
86  myCustomProperty1 = value;
87 }
89  return myCustomProperty1;
90 }
91 inline void AtomProperties::setMyCustomProperty2(const std::string value) {
92  myCustomProperty2 = value;
93 }
94 inline std::string AtomProperties::getMyCustomProperty2() const {
95  return myCustomProperty2;
96 }
97 
98 #endif
99 
AtomProperties(PhysicalModel *p, const double pos[3])
Definition: AtomProperties.h:57
void setMyCustomProperty2(const std::string)
Definition: AtomProperties.h:91
void xmlPrint(std::ostream &)
Print the properties in xml.
Definition: AtomProperties.cpp:41
virtual ~AtomProperties()
Definition: AtomProperties.cpp:37
int myCustomProperty1
Definition: AtomProperties.h:79
std::string myCustomProperty2
Definition: AtomProperties.h:80
int getMyCustomProperty1() const
Definition: AtomProperties.h:88
AtomProperties(PhysicalModel *p)
Constructors (do not change)
Definition: AtomProperties.h:48
void setMyCustomProperty1(const int)
Set and get method for all the properties.
Definition: AtomProperties.h:85
This is an automatically generated class for custom Atom properties.
Definition: AtomProperties.h:45
AtomProperties(PhysicalModel *p, const unsigned int ind, const double pos[3])
Definition: AtomProperties.h:60
std::string getMyCustomProperty2() const
Definition: AtomProperties.h:94
This is the main class of this project.
Definition: PhysicalModel.h:74
virtual void init()
Definition: AtomProperties.cpp:30
AtomProperties(PhysicalModel *p, const unsigned int ind)
Definition: AtomProperties.h:54
This class is the basic Atom Properties class.
Definition: BasicAtomProperties.h:41
AtomProperties(PhysicalModel *p, xmlNodePtr node)
Definition: AtomProperties.h:51