|
Computer Assited Medical Intervention Tool Kit
version 5.0
|
|
Go to the documentation of this file.
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
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
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
Component * getSubComponent(const unsigned int) const
get a subcomponent by its order number (index in the list of subcomponents)
Definition: MultiComponent.h:114
void removeFromParents()
this tell the parent components that this component is removed from memory.
Definition: modeling/libraries/pml/Component.cpp:48
std::string getField(unsigned int) const
get the name of field of given index
Definition: Properties.cpp:68
Properties * properties
Definition: modeling/libraries/pml/Component.h:118
void setPhysicalModel(PhysicalModel *) override
set the physical model (recursively)
Definition: MultiComponent.cpp:133
virtual bool isInstanceOf(const char *) const =0
pure virtual method, implemented in the child-class
unsigned int getNumberOfSubComponents() const
return the number of subcomponents
Definition: MultiComponent.h:111
void setExclusive(const bool)
set the exclusive flag
Definition: modeling/libraries/pml/Component.h:141
void deleteProperties()
delete the "properties" pointer and set it to NULL
Definition: modeling/libraries/pml/Component.cpp:42
unsigned int numberOfFields() const
get the number of extra fields found in the PML
Definition: Properties.cpp:63
void removeSubComponent(Component *c)
Remove a component from the list.
Definition: MultiComponent.h:130
void addParentMultiComponent(MultiComponent *)
add a particular parent MultiComponent in the list
Definition: modeling/libraries/pml/Component.h:170
bool isInstanceOf(const char *) const override
return true only if the parameter is equal to "MultiComponent"
Definition: MultiComponent.h:150
void deleteAllSubComponents()
this method free all the sub-components (i.e.
Definition: MultiComponent.cpp:48
This is the main class of this project. Following a nice concept, a physical model is able to represe...
Definition: PhysicalModel.h:86
A cell has an unique index in the physical model object, is composed by atoms, and different basic pr...
Definition: Cell.h:46
const std::string getName() const
get the name of the component
Definition: modeling/libraries/pml/Component.h:147
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
std::string getString(std::string attName) const
field accessor: get the field attName as a string value, if field does not exist, empty string is ret...
Definition: Properties.h:178
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
unsigned int getNumberOfCells() const override
get the total nr of cell of the component
Definition: MultiComponent.cpp:79
Mode
This is a duplicate of RenderingMode Mode....
Definition: RenderingMode.h:63
A component is something that composed something and could also be a part of something.
Definition: modeling/libraries/pml/Component.h:48
~MultiComponent() override
delete all the subcomponents (call the deleteAllSubComponents method)
Definition: MultiComponent.cpp:38
void removeParentMultiComponent(MultiComponent *)
remove a particular parent MultiComponent
Definition: modeling/libraries/pml/Component.h:173
A multi-component stores other components, hence providing a way to have an tree representation of co...
Definition: MultiComponent.h:44
bool isExclusive() const
tell if this component is exclusive or not
Definition: modeling/libraries/pml/Component.h:144
virtual void setPhysicalModel(PhysicalModel *)
set the physical model
Definition: modeling/libraries/pml/Component.h:180
std::vector< Component * > components
List of sub component.
Definition: MultiComponent.h:130
Cell * getCell(unsigned int) const override
get cell by order number (not cell index)
Definition: MultiComponent.cpp:91