26 #ifndef MULTICOMPONENT_H
27 #define MULTICOMPONENT_H
128 std::vector <Component *>::iterator it=
components.begin();
131 foundC = ((*it)->getName()==n)?(*it):NULL;
141 return (std::string(className)==std::string(
"MultiComponent"));
144 #endif //MULTICOMPONENT_H
std::vector< Component * > components
List of sub component.
Definition: MultiComponent.h:101
A cell has an unique index in the physical model object, is composed by atoms, and different basic pr...
Definition: Cell.h:41
virtual bool isInstanceOf(const char *) const
return true only if the parameter is equal to "MultiComponent"
Definition: MultiComponent.h:140
MultiComponent(PhysicalModel *)
Default Constructor.
virtual void setPhysicalModel(PhysicalModel *)
set the physical model (recursively)
virtual bool isInstanceOf(const char *) const =0
pure virtual method, implemented in the child-class
unsigned int getNumberOfCells() const
get the total nr of cell of the component
unsigned int getNumberOfSubComponents() const
Definition: MultiComponent.h:105
Mode
This is a duplicate of RenderingMode Mode....
Definition: RenderingMode.h:40
virtual bool isVisible(const RenderingMode::Mode mode) const
return the state of a visibility mode in all the sub component (if at least one sub component is visi...
virtual void setVisible(const RenderingMode::Mode mode, const bool b)
set the state of a visibility mode in all the sub component.
Component * getComponentByName(const std::string)
conveniant method to get the sub component of the name given in parameter
Definition: MultiComponent.h:127
void removeParentMultiComponent(MultiComponent *)
remove a particular parent MultiComponent
Definition: modeling/libraries/pml/Component.h:171
Component * getSubComponent(const unsigned int) const
Definition: MultiComponent.h:108
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:120
This is the main class of this project.
Definition: PhysicalModel.h:74
void addSubComponent(Component *)
Definition: MultiComponent.h:114
void xmlPrint(std::ostream &) const
print to an output stream in "pseaudo" XML format (do nothing if there are no sub components)...
void deleteAllSubComponents()
this method free all the sub-components (i.e.
void addParentMultiComponent(MultiComponent *)
add a particular parent MultiComponent in the list
Definition: modeling/libraries/pml/Component.h:168
Cell * getCell(unsigned int) const
get cell by order number (not cell index)
~MultiComponent()
delete all the subcomponents (call the deleteAllSubComponents method)
A multi-component stores other components, hence providing a way to have an tree representation of co...
Definition: MultiComponent.h:44