68 const std::string
getName()
const;
71 void setName(
const std::string);
75 virtual void xmlPrint(std::ostream&)
const = 0;
136 std::vector <MultiComponent*> parentMultiComponentList;
157 return parentMultiComponentList;
160 return (
unsigned int) parentMultiComponentList.size();
163 if (i < parentMultiComponentList.size()) {
164 return parentMultiComponentList[i];
171 parentMultiComponentList.push_back(c);
174 auto it = std::find(parentMultiComponentList.begin(), parentMultiComponentList.end(), c);
175 if (it != parentMultiComponentList.end()) {
176 parentMultiComponentList.erase(it);
A cell has an unique index in the physical model object, is composed by atoms, and different basic pr...
Definition: Cell.h:46
A component is something that composed something and could also be a part of something.
Definition: modeling/libraries/pml/Component.h:48
bool isExclusive() const
tell if this component is exclusive or not
Definition: modeling/libraries/pml/Component.h:144
Properties * getProperties()
get the component structural properties (guarantied to be non NULL)
Definition: modeling/libraries/pml/Component.h:188
virtual Cell * getCell(unsigned int) const =0
conveniant method to get cell by order number (not cell index)
void setExclusive(const bool)
set the exclusive flag
Definition: modeling/libraries/pml/Component.h:141
Component(PhysicalModel *, std::string n="")
Default constructor, a component needs to know the PM it is in.
Definition: modeling/libraries/pml/Component.cpp:30
virtual unsigned int getNumberOfCells() const =0
get the total nr of cell of the component
Properties * properties
Definition: modeling/libraries/pml/Component.h:118
virtual void setVisible(const RenderingMode::Mode mode, const bool b)=0
set the state of a visibility mode
virtual void setPhysicalModel(PhysicalModel *)
set the physical model
Definition: modeling/libraries/pml/Component.h:180
unsigned int getNumberOfParentMultiComponents() const
get the number of MultiComponent that are using this Component (= nr of parent component)
Definition: modeling/libraries/pml/Component.h:159
void removeParentMultiComponent(MultiComponent *)
remove a particular parent MultiComponent
Definition: modeling/libraries/pml/Component.h:173
std::vector< MultiComponent * > getAllParentMultiComponents()
get the list of all the Multi Component that are using this Component
Definition: modeling/libraries/pml/Component.h:156
void addParentMultiComponent(MultiComponent *)
add a particular parent MultiComponent in the list
Definition: modeling/libraries/pml/Component.h:170
MultiComponent * getParentMultiComponent(unsigned int)
get a particular MultiComponent that is using this Component (a particular parent component)
Definition: modeling/libraries/pml/Component.h:162
PhysicalModel * getPhysicalModel() const
get the physical model
Definition: modeling/libraries/pml/Component.h:184
virtual void xmlPrint(std::ostream &) const =0
print to an output stream in "pseudo" XML format.
const std::string getName() const
get the name of the component
Definition: modeling/libraries/pml/Component.h:147
virtual bool isInstanceOf(const char *) const =0
pure virtual method, implemented in the child-class
void removeFromParents()
this tell the parent components that this component is removed from memory.
Definition: modeling/libraries/pml/Component.cpp:48
virtual ~Component()
Virtual destructor needed here as this is an abstract class (pure virtual)
Definition: modeling/libraries/pml/Component.cpp:36
void setName(const std::string)
set the name of the component
Definition: modeling/libraries/pml/Component.h:150
virtual bool isVisible(const RenderingMode::Mode mode) const =0
return the state of a visibility mode
void deleteProperties()
delete the "properties" pointer and set it to NULL
Definition: modeling/libraries/pml/Component.cpp:42
A multi-component stores other components, hence providing a way to have an tree representation of co...
Definition: MultiComponent.h:44
This is the main class of this project.
Definition: PhysicalModel.h:86
Describes the properties common to all structures and components.
Definition: Properties.h:59
std::string getName() const
get the name (be careful, this method DOES NOT return a copy, so you got the direct ptr to the name!...
Definition: Properties.h:250
PhysicalModel * getPhysicalModel() const
get the physical model
Definition: Properties.h:262
void setName(std::string)
set the name (use the string = operator)
Definition: Properties.h:254
void setPhysicalModel(PhysicalModel *)
set the physical model
Definition: Properties.h:258
Mode
This is a duplicate of RenderingMode Mode....
Definition: RenderingMode.h:40