26 #ifndef MULTICOMPONENT_H
27 #define MULTICOMPONENT_H
83 void xmlPrint(std::ostream&)
const override;
141 foundC = ((*it)->getName() == n) ? (*it) : NULL;
151 return (std::string(className) == std::string(
"MultiComponent"));
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
void setExclusive(const bool)
set the exclusive flag
Definition: modeling/libraries/pml/Component.h:141
void removeParentMultiComponent(MultiComponent *)
remove a particular parent MultiComponent
Definition: modeling/libraries/pml/Component.h:173
void addParentMultiComponent(MultiComponent *)
add a particular parent MultiComponent in the list
Definition: modeling/libraries/pml/Component.h:170
virtual bool isInstanceOf(const char *) const =0
pure virtual method, implemented in the child-class
A multi-component stores other components, hence providing a way to have an tree representation of co...
Definition: MultiComponent.h:44
void setPhysicalModel(PhysicalModel *) override
set the physical model (recursively)
Definition: MultiComponent.cpp:133
void setVisible(const RenderingMode::Mode mode, const bool b) override
set the state of a visibility mode in all the sub component.
Definition: MultiComponent.cpp:125
bool isInstanceOf(const char *) const override
return true only if the parameter is equal to "MultiComponent"
Definition: MultiComponent.h:150
bool isVisible(const RenderingMode::Mode mode) const override
return the state of a visibility mode in all the sub component (if at least one sub component is visi...
Definition: MultiComponent.cpp:116
void addSubComponent(Component *)
add a component in the list of subcomponents (and set the isExclusive flag accordingly to the state o...
Definition: MultiComponent.h:122
MultiComponent(PhysicalModel *)
Default Constructor.
Definition: MultiComponent.cpp:29
Component * getComponentByName(const std::string)
conveniant method to get the sub component of the name given in parameter
Definition: MultiComponent.h:137
void xmlPrint(std::ostream &) const override
print to an output stream in "pseaudo" XML format (do nothing if there are no sub components).
Definition: MultiComponent.cpp:58
void deleteAllSubComponents()
this method free all the sub-components (i.e.
Definition: MultiComponent.cpp:48
Cell * getCell(unsigned int) const override
get cell by order number (not cell index)
Definition: MultiComponent.cpp:91
Component * getSubComponent(const unsigned int) const
get a subcomponent by its order number (index in the list of subcomponents)
Definition: MultiComponent.h:114
~MultiComponent() override
delete all the subcomponents (call the deleteAllSubComponents method)
Definition: MultiComponent.cpp:38
std::vector< Component * > components
List of sub component.
Definition: MultiComponent.h:107
unsigned int getNumberOfCells() const override
get the total nr of cell of the component
Definition: MultiComponent.cpp:79
void removeSubComponent(Component *c)
Remove a component from the list.
Definition: MultiComponent.h:130
unsigned int getNumberOfSubComponents() const
return the number of subcomponents
Definition: MultiComponent.h:111
This is the main class of this project.
Definition: PhysicalModel.h:86
Mode
This is a duplicate of RenderingMode Mode....
Definition: RenderingMode.h:40