A component is something that composed something and could also be a part of something. More...
#include <Component.h>
Public Member Functions | |
Component (PhysicalModel *, std::string n="") | |
Default constructor, a component needs to know the PM it is in. More... | |
virtual Cell * | getCell (unsigned int) const =0 |
conveniant method to get cell by order number (not cell index) More... | |
const std::string | getName () const |
get the name of the component More... | |
virtual unsigned int | getNumberOfCells () const =0 |
get the total nr of cell of the component More... | |
bool | isExclusive () const |
tell if this component is exclusive or not More... | |
virtual bool | isInstanceOf (const char *) const =0 |
pure virtual method, implemented in the child-class More... | |
virtual bool | isVisible (const RenderingMode::Mode mode) const =0 |
return the state of a visibility mode More... | |
void | setExclusive (const bool) |
set the exclusive flag More... | |
void | setName (const std::string) |
set the name of the component More... | |
virtual void | setVisible (const RenderingMode::Mode mode, const bool b)=0 |
set the state of a visibility mode More... | |
virtual void | xmlPrint (std::ostream &) const =0 |
print to an output stream in "pseudo" XML format. More... | |
virtual | ~Component () |
Virtual destructor needed here as this is an abstract class (pure virtual) More... | |
parent multi component admin | |
Properties * | properties |
bool | exclusive |
std::vector< MultiComponent * > | parentMultiComponentList |
list of Component that are using this component (if another component is using this component, it is in this list) More... | |
std::vector< MultiComponent * > | getAllParentMultiComponents () |
get the list of all the Multi Component that are using this Component More... | |
unsigned int | getNumberOfParentMultiComponents () const |
get the number of MultiComponent that are using this Component (= nr of parent component) More... | |
MultiComponent * | getParentMultiComponent (unsigned int) |
get a particular MultiComponent that is using this Component (a particular parent component) More... | |
void | addParentMultiComponent (MultiComponent *) |
add a particular parent MultiComponent in the list More... | |
void | removeParentMultiComponent (MultiComponent *) |
remove a particular parent MultiComponent More... | |
virtual void | setPhysicalModel (PhysicalModel *) |
set the physical model More... | |
PhysicalModel * | getPhysicalModel () const |
get the physical model More... | |
Properties * | getProperties () |
get the component structural properties (guarantied to be non NULL) More... | |
void | removeFromParents () |
this tell the parent components that this component is removed from memory. More... | |
void | deleteProperties () |
delete the "properties" pointer and set it to NULL More... | |
A component is something that composed something and could also be a part of something.
(just in case you don't really understand, a good reference is "The hitch hiker's guide to the galaxy", Douglas Adams, 1952-2001. Thanks for reading this absolutly clear documentation!!!)
Component::Component | ( | PhysicalModel * | p, |
std::string | n = "" |
||
) |
Default constructor, a component needs to know the PM it is in.
If not given name is initialized to the empty string
References exclusive, and properties.
|
virtual |
Virtual destructor needed here as this is an abstract class (pure virtual)
References deleteProperties(), and removeFromParents().
|
inline |
add a particular parent MultiComponent in the list
References parentMultiComponentList.
Referenced by MultiComponent::addSubComponent().
|
protected |
delete the "properties" pointer and set it to NULL
References properties.
Referenced by StructuralComponent::StructuralComponent(), Cell::~Cell(), ~Component(), MultiComponent::~MultiComponent(), and StructuralComponent::~StructuralComponent().
|
inline |
get the list of all the Multi Component that are using this Component
References parentMultiComponentList.
|
pure virtual |
conveniant method to get cell by order number (not cell index)
Implemented in StructuralComponent, and MultiComponent.
Referenced by PhysicalModel::exportAnsysMesh(), PhysicalModel::exportPatran(), and SofaSimulator::SofaSimulator().
|
inline |
get the name of the component
References Properties::getName(), and properties.
Referenced by CreateSC::apply(), PMLExplorerWidget::buildMultiComponentTreeWidgetItem(), PMLExplorerWidget::buildStructuralComponentTreeWidgetItem(), PMLComponent::createCellSelectionVTKPipeline(), PMLExplorerWidget::createMCPropertyList(), PMLExplorerWidget::createSCPropertyList(), Position::Position(), PMLComponent::selectCell(), and MultiComponent::xmlPrint().
|
pure virtual |
get the total nr of cell of the component
Implemented in StructuralComponent, and MultiComponent.
Referenced by PhysicalModel::exportAnsysMesh(), PhysicalModel::exportPatran(), and SofaSimulator::SofaSimulator().
|
inline |
get the number of MultiComponent that are using this Component (= nr of parent component)
References parentMultiComponentList.
|
inline |
get a particular MultiComponent that is using this Component (a particular parent component)
References parentMultiComponentList.
|
inline |
get the physical model
References Properties::getPhysicalModel(), and properties.
Referenced by PMLTransform::generateExternalSurface(), Cell::getQuadFaces(), Cell::getTriangleFaces(), and Cell::setIndex().
|
inline |
get the component structural properties (guarantied to be non NULL)
References properties.
Referenced by PMLExplorerWidget::createMCPropertyList(), PMLExplorerWidget::propertyChanged(), and ParametersWriter::write().
|
inline |
tell if this component is exclusive or not
References exclusive.
Referenced by MultiComponent::addSubComponent(), and Cell::makePrintData().
|
pure virtual |
pure virtual method, implemented in the child-class
Implemented in StructuralComponent, MultiComponent, and Cell.
Referenced by MultiComponent::getComponentByName(), and PhysicalModel::optimizeIndexes().
|
pure virtual |
return the state of a visibility mode
Implemented in StructuralComponent, and MultiComponent.
|
protected |
this tell the parent components that this component is removed from memory.
As the destructor is virtual, this method has to be called in all sub-classes destructors.
References parentMultiComponentList.
Referenced by Cell::~Cell(), ~Component(), MultiComponent::~MultiComponent(), and StructuralComponent::~StructuralComponent().
|
inline |
remove a particular parent MultiComponent
References parentMultiComponentList.
Referenced by MultiComponent::removeSubComponent().
|
inline |
set the exclusive flag
References exclusive.
Referenced by MultiComponent::addSubComponent(), SofaSimulator::createPml(), and PhysicalModel::parseComponents().
|
inline |
set the name of the component
References properties, and Properties::setName().
Referenced by PhysicalModel::parseComponents(), PMLExplorerWidget::propertyChanged(), and PMLComponentExtension::save().
|
inlinevirtual |
set the physical model
Reimplemented in StructuralComponent, and MultiComponent.
References properties, and Properties::setPhysicalModel().
Referenced by MultiComponent::setPhysicalModel(), and StructuralComponent::setPhysicalModel().
|
pure virtual |
set the state of a visibility mode
Implemented in StructuralComponent, and MultiComponent.
|
pure virtual |
print to an output stream in "pseudo" XML format.
Implemented in StructuralComponent, and MultiComponent.
|
private |
Referenced by Component(), isExclusive(), and setExclusive().
|
private |
list of Component that are using this component (if another component is using this component, it is in this list)
Referenced by addParentMultiComponent(), getAllParentMultiComponents(), getNumberOfParentMultiComponents(), getParentMultiComponent(), removeFromParents(), and removeParentMultiComponent().
|
protected |
Referenced by Component(), ComponentGenerator::createFromDom(), deleteProperties(), StructuralComponent::getAtoms(), StructuralComponent::getColor(), StructuralComponent::getMode(), getName(), getPhysicalModel(), getProperties(), StructuralComponent::getProperties(), StructuralComponent::getStructuralComponentPropertiesColor(), StructuralComponent::isVisible(), StructuralComponent::setColor(), StructuralComponent::setMode(), setName(), setPhysicalModel(), StructuralComponent::setVisible(), StructuralComponent::StructuralComponent(), Cell::xmlPrint(), MultiComponent::xmlPrint(), and StructuralComponent::xmlPrint().