72 virtual bool setIndex(
const unsigned int);
109 std::vector <StructuralComponent *>
mySCs;
118 return (
unsigned int)
mySCs.size();
131 std::vector <StructuralComponent *>::iterator it = std::find(
mySCs.begin(),
mySCs.end(), sc);
132 if (it !=
mySCs.end())
137 #endif // STRUCTURE_H
StructuralComponent * getStructuralComponent(unsigned int i)
get a particular StructuralComponent that is using this structure
Definition: Structure.h:120
Pure virtual class that represent an element of the structure.
Definition: Structure.h:43
virtual void xmlPrint(std::ostream &, const StructuralComponent *)=0
print to an output stream in "pseaudo" XML format.
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:130
StructureProperties * properties
Property of the current structure.
Definition: Structure.h:104
virtual ~Structure()
Virtual destructor needed here as this is an abstract class (pure virtual)
Definition: Structure.h:50
unsigned int getNumberOfStructuralComponents() const
get the number of StructuralComponent that are using this structure
Definition: Structure.h:117
std::vector< StructuralComponent * > getAllStructuralComponents()
get the list of all the StructuralComponent that are using this structure
Definition: Structure.h:114
virtual bool setIndex(const unsigned int)
set the index.
Definition: Structure.cpp:34
This is the main class of this project.
Definition: PhysicalModel.h:86
Describes the properties common to all structures.
Definition: StructureProperties.h:38
Structure()
Base constructor.
Definition: Structure.h:46
GeometricType
Geometric type gives information about which kind of geometric representation is the structure...
Definition: StructureProperties.h:107
std::string getName() const
get the name of the structure
Definition: Structure.cpp:48
bool hasIndex
indicate if the Structure has an index (which is not the case all the time)
Definition: Structure.h:61
virtual void setPhysicalModel(PhysicalModel *)
set the physical model
Definition: Structure.cpp:53
A structural component is composed either by cell or by atoms.
Definition: StructuralComponent.h:52
void setName(std::string)
set the name of the structure
Definition: Structure.cpp:44
virtual void addStructuralComponent(StructuralComponent *)
add a particular StructuralComponent in the list
Definition: Structure.h:126
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 * > mySCs
list of StructuralComponent that are using this structure
Definition: Structure.h:109