Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
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:

Public Member Functions

 Component (PhysicalModel *, std::string n="")
 Default constructor, a component needs to know the PM it is in. More...
 
virtual CellgetCell (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...
 
PhysicalModelgetPhysicalModel () const
 get the physical model More...
 
PropertiesgetProperties ()
 get the component structural properties (guarantied to be non NULL) 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 setPhysicalModel (PhysicalModel *)
 set the physical model 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
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...
 
MultiComponentgetParentMultiComponent (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...
 

Protected Member Functions

void deleteProperties ()
 delete the "properties" pointer and set it to NULL More...
 
void removeFromParents ()
 this tell the parent components that this component is removed from memory. More...
 

Protected Attributes

Propertiesproperties
 

Private Attributes

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

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 ( PhysicalModel ,
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

virtual Component::~Component ( )
virtual

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

Member Function Documentation

void Component::addParentMultiComponent ( MultiComponent c)
inline

add a particular parent MultiComponent in the list

References parentMultiComponentList.

Referenced by MultiComponent::addSubComponent().

void Component::deleteProperties ( )
protected

delete the "properties" pointer and set it to NULL

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

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

References parentMultiComponentList.

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

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

Implemented in StructuralComponent, and MultiComponent.

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

get the name of the component

References Properties::getName(), and properties.

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

get the total nr of cell of the component

Implemented in StructuralComponent, and MultiComponent.

unsigned int Component::getNumberOfParentMultiComponents ( ) const
inline

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

References parentMultiComponentList.

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

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

References parentMultiComponentList.

PhysicalModel * Component::getPhysicalModel ( ) const
inline

get the physical model

References Properties::getPhysicalModel(), and properties.

Properties * Component::getProperties ( )
inline

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

References properties.

bool Component::isExclusive ( ) const
inline

tell if this component is exclusive or not

References exclusive.

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

pure virtual method, implemented in the child-class

Implemented in StructuralComponent, Cell, and MultiComponent.

Referenced by MultiComponent::getComponentByName(), and PMManagerDC::getDC().

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

return the state of a visibility mode

Implemented in StructuralComponent, and MultiComponent.

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.

void Component::removeParentMultiComponent ( MultiComponent c)
inline

remove a particular parent MultiComponent

References parentMultiComponentList.

Referenced by MultiComponent::removeSubComponent().

void Component::setExclusive ( const bool  b)
inline

set the exclusive flag

References exclusive.

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

set the name of the component

References properties, and Properties::setName().

Referenced by ComponentDC::setName().

void Component::setPhysicalModel ( PhysicalModel pm)
inlinevirtual

set the physical model

Reimplemented in StructuralComponent, and MultiComponent.

References properties, and Properties::setPhysicalModel().

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

set the state of a visibility mode

Implemented in StructuralComponent, and MultiComponent.

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

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

Implemented in StructuralComponent, and MultiComponent.

Member Data Documentation

bool Component::exclusive
private

Referenced by isExclusive(), and setExclusive().

std::vector<MultiComponent *> Component::parentMultiComponentList
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(), and removeParentMultiComponent().

Properties* Component::properties
protected

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