26 #ifndef BASICATOMPROPERTIES_H
27 #define BASICATOMPROPERTIES_H
77 virtual void xmlPrint(std::ostream &) =0;
91 void setPosition(
const double,
const double,
const double);
108 void endXML(std::ostream &);
129 pos[0]=
X[0]; pos[1]=
X[1]; pos[2]=
X[2];
133 X[0]=pos[0];
X[1]=pos[1];
X[2]=pos[2];
137 X[0]=x;
X[1]=y;
X[2]=z;
140 #endif //BasicAtomProperties_H
double * X
Pointer to the memory triplet that stores the atom's position.
Definition: BasicAtomProperties.h:121
void allocate()
allocate the memory needed for the position (double[3]).
void setPosition(const double[3])
set the position of the atom
Definition: BasicAtomProperties.h:132
static unsigned int maxUniqueIndex
unique number (used to generate unique index for atoms if not given at the instanciation) ...
Definition: BasicAtomProperties.h:112
bool allocated
true only if the memory used for the position was allocated in the constructor and not changed afterw...
Definition: BasicAtomProperties.h:124
virtual void xmlPrint(std::ostream &)=0
print to an output stream in "pseudo" XML format.
BasicAtomProperties(PhysicalModel *myPM)
Default constructor : set the position to the origin, and generate an unique index.
void getPosition(double pos[3]) const
get the position of the atom (array of 3 doubles)
Definition: BasicAtomProperties.h:128
virtual ~BasicAtomProperties()
the destructor...
PhysicalModel * myPM
pointer to the physical model the object is in
Definition: Properties.h:134
This is the main class of this project.
Definition: PhysicalModel.h:74
Describes the properties common to all structures.
Definition: StructureProperties.h:38
This class is the basic Atom Properties class.
Definition: BasicAtomProperties.h:41
static void resetUniqueIndex()
Reinitialize the unique index to zero (usually that what you want to do when you start to load a new ...
void endXML(std::ostream &)
write the default xml properties (end)
void beginXML(std::ostream &)
write the default xml properties (beginning)
void setPositionPointer(double *ptr, bool update=true)
change the position pointer.