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"));
154 #endif //MULTICOMPONENT_H ~MultiComponent() override
delete all the subcomponents (call the deleteAllSubComponents method)
Definition: MultiComponent.cpp:38
bool isExclusive() const
tell if this component is exclusive or not
Definition: modeling/libraries/pml/Component.h:144
A cell has an unique index in the physical model object, is composed by atoms, and different basic pr...
Definition: Cell.h:46
Cell * getCell(unsigned int) const override
get cell by order number (not cell index)
Definition: MultiComponent.cpp:89
MultiComponent(PhysicalModel *)
Default Constructor.
Definition: MultiComponent.cpp:29
void setPhysicalModel(PhysicalModel *) override
set the physical model (recursively)
Definition: MultiComponent.cpp:131
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:56
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:123
bool isInstanceOf(const char *) const override
return true only if the parameter is equal to "MultiComponent"
Definition: MultiComponent.h:150
virtual bool isInstanceOf(const char *) const =0
pure virtual method, implemented in the child-class
std::vector< Component * > components
List of sub component.
Definition: MultiComponent.h:107
void setExclusive(const bool)
set the exclusive flag
Definition: modeling/libraries/pml/Component.h:141
Component * getComponentByName(const std::string)
conveniant method to get the sub component of the name given in parameter
Definition: MultiComponent.h:137
void removeParentMultiComponent(MultiComponent *)
remove a particular parent MultiComponent
Definition: modeling/libraries/pml/Component.h:173
unsigned int getNumberOfSubComponents() const
return the number of subcomponents
Definition: MultiComponent.h:111
unsigned int getNumberOfCells() const override
get the total nr of cell of the component
Definition: MultiComponent.cpp:77
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:114
A component is something that composed something and could also be a part of something.
Definition: modeling/libraries/pml/Component.h:48
void removeSubComponent(Component *c)
Remove a component from the list.
Definition: MultiComponent.h:130
Mode
This is a duplicate of RenderingMode Mode....
Definition: RenderingMode.h:40
This is the main class of this project.
Definition: PhysicalModel.h:86
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
void deleteAllSubComponents()
this method free all the sub-components (i.e.
Definition: MultiComponent.cpp:48
void addParentMultiComponent(MultiComponent *)
add a particular parent MultiComponent in the list
Definition: modeling/libraries/pml/Component.h:170
A multi-component stores other components, hence providing a way to have an tree representation of co...
Definition: MultiComponent.h:44
Component * getSubComponent(const unsigned int) const
get a subcomponent by its order number (index in the list of subcomponents)
Definition: MultiComponent.h:114