Computer Assisted Medical Intervention Tool Kit  version 5.2
 
Loading...
Searching...
No Matches
Component Class Referenceabstract

A component is something that composed something and could also be a part of something. More...

#include <Component.h>

+ Inheritance diagram for Component:
+ Collaboration diagram for Component:

Public Member Functions

 Component (PhysicalModel *, std::string n="")
 Default constructor, a component needs to know the PM it is in.
 
virtual CellgetCell (unsigned int) const =0
 conveniant method to get cell by order number (not cell index)
 
const std::string getName () const
 get the name of the component
 
virtual unsigned int getNumberOfCells () const =0
 get the total nr of cell of the component
 
bool isExclusive () const
 tell if this component is exclusive or not
 
virtual bool isInstanceOf (const char *) const =0
 pure virtual method, implemented in the child-class
 
virtual bool isVisible (const RenderingMode::Mode mode) const =0
 return the state of a visibility mode
 
void setExclusive (const bool)
 set the exclusive flag
 
void setName (const std::string)
 set the name of the component
 
virtual void setVisible (const RenderingMode::Mode mode, const bool b)=0
 set the state of a visibility mode
 
virtual void xmlPrint (std::ostream &) const =0
 print to an output stream in "pseudo" XML format.
 
virtual ~Component ()
 Virtual destructor needed here as this is an abstract class (pure virtual)
 

parent multi component admin

Propertiesproperties
 
std::vector< MultiComponent * > getAllParentMultiComponents ()
 get the list of all the Multi Component that are using this Component
 
unsigned int getNumberOfParentMultiComponents () const
 get the number of MultiComponent that are using this Component (= nr of parent component)
 
MultiComponentgetParentMultiComponent (unsigned int)
 get a particular MultiComponent that is using this Component (a particular parent component)
 
void addParentMultiComponent (MultiComponent *)
 add a particular parent MultiComponent in the list
 
void removeParentMultiComponent (MultiComponent *)
 remove a particular parent MultiComponent
 
virtual void setPhysicalModel (PhysicalModel *)
 set the physical model
 
PhysicalModelgetPhysicalModel () const
 get the physical model
 
PropertiesgetProperties ()
 get the component structural properties (guarantied to be non NULL)
 
void removeFromParents ()
 this tell the parent components that this component is removed from memory.
 
void deleteProperties ()
 delete the "properties" pointer and set it to NULL
 

Detailed Description

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!!!)

Constructor & Destructor Documentation

◆ Component()

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 properties.

◆ ~Component()

Component::~Component ( )
virtual

Virtual destructor needed here as this is an abstract class (pure virtual)

References deleteProperties(), and removeFromParents().

+ Here is the call graph for this function:

Member Function Documentation

◆ addParentMultiComponent()

void Component::addParentMultiComponent ( MultiComponent c)
inline

add a particular parent MultiComponent in the list

Referenced by MultiComponent::addSubComponent().

+ Here is the caller graph for this function:

◆ deleteProperties()

void Component::deleteProperties ( )
protected

delete the "properties" pointer and set it to NULL

References properties.

Referenced by StructuralComponent::StructuralComponent(), StructuralComponent::StructuralComponent(), StructuralComponent::StructuralComponent(), Cell::~Cell(), ~Component(), MultiComponent::~MultiComponent(), and StructuralComponent::~StructuralComponent().

+ Here is the caller graph for this function:

◆ getAllParentMultiComponents()

std::vector< MultiComponent * > Component::getAllParentMultiComponents ( )
inline

get the list of all the Multi Component that are using this Component

◆ getCell()

virtual Cell * Component::getCell ( unsigned int  ) const
pure virtual

conveniant method to get cell by order number (not cell index)

Implemented in MultiComponent, and StructuralComponent.

Referenced by PhysicalModel::exportAnsysMesh(), PhysicalModel::exportPatran(), and SofaSimulator::SofaSimulator().

+ Here is the caller graph for this function:

◆ getName()

const std::string Component::getName ( ) const
inline

get the name of the component

References Properties::getName(), and properties.

Referenced by CreateSC::apply(), Position::Position(), PMLComponent::selectCell(), and MultiComponent::xmlPrint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNumberOfCells()

virtual unsigned int Component::getNumberOfCells ( ) const
pure virtual

get the total nr of cell of the component

Implemented in MultiComponent, and StructuralComponent.

Referenced by PhysicalModel::exportAnsysMesh(), PhysicalModel::exportPatran(), and SofaSimulator::SofaSimulator().

+ Here is the caller graph for this function:

◆ getNumberOfParentMultiComponents()

unsigned int Component::getNumberOfParentMultiComponents ( ) const
inline

get the number of MultiComponent that are using this Component (= nr of parent component)

◆ getParentMultiComponent()

MultiComponent * Component::getParentMultiComponent ( unsigned int  i)
inline

get a particular MultiComponent that is using this Component (a particular parent component)

◆ getPhysicalModel()

PhysicalModel * Component::getPhysicalModel ( ) const
inline

get the physical model

References Properties::getPhysicalModel(), and properties.

Referenced by PMLTransform::generateExternalSurface(), Cell::getQuadFaces(), Cell::getTriangleFaces(), and Cell::setIndex().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getProperties()

Properties * Component::getProperties ( )
inline

get the component structural properties (guarantied to be non NULL)

References properties.

Referenced by PMLExplorerWidget::propertyChanged(), and ParametersWriter::write().

+ Here is the caller graph for this function:

◆ isExclusive()

bool Component::isExclusive ( ) const
inline

tell if this component is exclusive or not

Referenced by MultiComponent::addSubComponent(), and Cell::makePrintData().

+ Here is the caller graph for this function:

◆ isInstanceOf()

virtual bool Component::isInstanceOf ( const char *  ) const
pure virtual

pure virtual method, implemented in the child-class

Implemented in Cell, MultiComponent, and StructuralComponent.

Referenced by MultiComponent::getComponentByName().

+ Here is the caller graph for this function:

◆ isVisible()

virtual bool Component::isVisible ( const RenderingMode::Mode  mode) const
pure virtual

return the state of a visibility mode

Implemented in MultiComponent, and StructuralComponent.

◆ removeFromParents()

void Component::removeFromParents ( )
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.

Referenced by Cell::~Cell(), ~Component(), MultiComponent::~MultiComponent(), and StructuralComponent::~StructuralComponent().

+ Here is the caller graph for this function:

◆ removeParentMultiComponent()

void Component::removeParentMultiComponent ( MultiComponent c)
inline

remove a particular parent MultiComponent

Referenced by MultiComponent::removeSubComponent().

+ Here is the caller graph for this function:

◆ setExclusive()

void Component::setExclusive ( const bool  b)
inline

set the exclusive flag

Referenced by MultiComponent::addSubComponent(), and SofaSimulator::createPml().

+ Here is the caller graph for this function:

◆ setName()

void Component::setName ( const std::string  n)
inline

set the name of the component

References properties, and Properties::setName().

Referenced by PMLExplorerWidget::propertyChanged(), and PMLComponentExtension::save().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPhysicalModel()

void Component::setPhysicalModel ( PhysicalModel pm)
inlinevirtual

set the physical model

Reimplemented in MultiComponent, and StructuralComponent.

References properties, and Properties::setPhysicalModel().

Referenced by MultiComponent::setPhysicalModel(), and StructuralComponent::setPhysicalModel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setVisible()

virtual void Component::setVisible ( const RenderingMode::Mode  mode,
const bool  b 
)
pure virtual

set the state of a visibility mode

Implemented in MultiComponent, and StructuralComponent.

◆ xmlPrint()

virtual void Component::xmlPrint ( std::ostream &  ) const
pure virtual

print to an output stream in "pseudo" XML format.

Implemented in MultiComponent, and StructuralComponent.

Member Data Documentation

◆ properties


The documentation for this class was generated from the following files: