 |
Computer Assited Medical Intervention Tool Kit
version 4.1
|
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:136
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:57
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:115
Component * getSubComponent(const unsigned int) const
get a subcomponent by its order number (index in the list of subcomponents)
Definition: MultiComponent.h:113
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:71
Properties * properties
Definition: modeling/libraries/pml/Component.h:117
void setPhysicalModel(PhysicalModel *) override
set the physical model (recursively)
Definition: MultiComponent.cpp:132
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:110
void setExclusive(const bool)
set the exclusive flag
Definition: modeling/libraries/pml/Component.h:140
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:66
void removeSubComponent(Component *c)
Remove a component from the list.
Definition: MultiComponent.h:129
void addParentMultiComponent(MultiComponent *)
add a particular parent MultiComponent in the list
Definition: modeling/libraries/pml/Component.h:169
bool isInstanceOf(const char *) const override
return true only if the parameter is equal to "MultiComponent"
Definition: MultiComponent.h:149
void deleteAllSubComponents()
this method free all the sub-components (i.e.
Definition: MultiComponent.cpp:47
This is the main class of this project. Following a nice concept, a physical model is able to represe...
Definition: PhysicalModel.h:85
A cell has an unique index in the physical model object, is composed by atoms, and different basic pr...
Definition: Cell.h:45
const std::string getName() const
get the name of the component
Definition: modeling/libraries/pml/Component.h:146
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:124
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:177
void addSubComponent(Component *)
add a component in the list of subcomponents (and set the isExclusive flag accordingly to the state o...
Definition: MultiComponent.h:121
MultiComponent(PhysicalModel *)
Default Constructor.
Definition: MultiComponent.cpp:28
unsigned int getNumberOfCells() const override
get the total nr of cell of the component
Definition: MultiComponent.cpp:78
Mode
This is a duplicate of RenderingMode Mode....
Definition: RenderingMode.h:61
A component is something that composed something and could also be a part of something.
Definition: modeling/libraries/pml/Component.h:47
~MultiComponent() override
delete all the subcomponents (call the deleteAllSubComponents method)
Definition: MultiComponent.cpp:37
void removeParentMultiComponent(MultiComponent *)
remove a particular parent MultiComponent
Definition: modeling/libraries/pml/Component.h:172
A multi-component stores other components, hence providing a way to have an tree representation of co...
Definition: MultiComponent.h:43
bool isExclusive() const
tell if this component is exclusive or not
Definition: modeling/libraries/pml/Component.h:143
virtual void setPhysicalModel(PhysicalModel *)
set the physical model
Definition: modeling/libraries/pml/Component.h:179
std::vector< Component * > components
List of sub component.
Definition: MultiComponent.h:128
Cell * getCell(unsigned int) const override
get cell by order number (not cell index)
Definition: MultiComponent.cpp:90