72 virtual bool setIndex(
const unsigned int);
109 std::vector <StructuralComponent*> mySCs;
118 return (
unsigned int) mySCs.size();
121 if (i < mySCs.size()) {
133 auto it = std::find(mySCs.begin(), mySCs.end(), sc);
134 if (it != mySCs.end()) {
This is the main class of this project.
Definition: PhysicalModel.h:86
A structural component is composed either by cell or by atoms.
Definition: StructuralComponent.h:52
Describes the properties common to all structures.
Definition: StructureProperties.h:38
GeometricType
Geometric type gives information about which kind of geometric representation is the structure.
Definition: StructureProperties.h:107
Pure virtual class that represent an element of the structure.
Definition: Structure.h:43
unsigned int getIndex() const
get the structure unique index (stored in its property)
Definition: Structure.cpp:30
void removeStructuralComponent(StructuralComponent *)
remove a particular StructuralComponent from the list
Definition: Structure.h:132
std::string getName() const
get the name of the structure
Definition: Structure.cpp:48
virtual void xmlPrint(std::ostream &, const StructuralComponent *)=0
print to an output stream in "pseaudo" XML format.
unsigned int getNumberOfStructuralComponents() const
get the number of StructuralComponent that are using this structure
Definition: Structure.h:117
StructureProperties * properties
Property of the current structure.
Definition: Structure.h:104
bool hasIndex
indicate if the Structure has an index (which is not the case all the time)
Definition: Structure.h:61
virtual ~Structure()=default
Virtual destructor needed here as this is an abstract class (pure virtual)
StructureProperties::GeometricType getType() const
get the type of index
Definition: Structure.cpp:40
virtual bool isInstanceOf(const char *) const =0
pure virtual method, implemented in the child-class
std::vector< StructuralComponent * > getAllStructuralComponents()
get the list of all the StructuralComponent that are using this structure
Definition: Structure.h:114
virtual void setPhysicalModel(PhysicalModel *)
set the physical model
Definition: Structure.cpp:53
Structure()
Base constructor.
Definition: Structure.h:46
void setName(std::string)
set the name of the structure
Definition: Structure.cpp:44
StructuralComponent * getStructuralComponent(unsigned int i)
get a particular StructuralComponent that is using this structure
Definition: Structure.h:120
virtual void addStructuralComponent(StructuralComponent *)
add a particular StructuralComponent in the list
Definition: Structure.h:128
virtual bool setIndex(const unsigned int)
set the index.
Definition: Structure.cpp:34