SOFA API  c76874b7
Open source framework for multi-physics simuation
sofa::helper::TagFactory Class Reference

#include <TagFactory.h>

Detailed Description

the TagFactory class class manage the tags list shared all the components and visitors. It allows to define subsets to process by specific visitors The user only gives strings to define the subsets, and an id is given back and is used to do the tests of belonging The id is the index of the string in the "tagsList" vector

Protected Attributes

std::vector< std::string > tagsList
 the list of the tag names. the Ids are the indices in the vector More...
 

Static Public Member Functions

static unsigned int getID (std::string name)
 
static std::string getName (unsigned int id)
 return the name corresponding to the id in parameter More...
 
static TagFactorygetInstance ()
 return the instance of the factory. Creates it if doesn't exist yet. More...
 

Protected Member Functions

 TagFactory ()
 

Attribute details

std::vector<std::string> sofa::helper::TagFactory::tagsList
protected

the list of the tag names. the Ids are the indices in the vector

Constructor details

sofa::helper::TagFactory::TagFactory ( )
protected

Function details

unsigned int sofa::helper::TagFactory::getID ( std::string  name)
static
Returns
: the Id corresponding to the name of the tag given in parameter If the name isn't found in the list, it is added to it and return the new id.
TagFactory * sofa::helper::TagFactory::getInstance ( )
static

return the instance of the factory. Creates it if doesn't exist yet.

std::string sofa::helper::TagFactory::getName ( unsigned int  id)
static

return the name corresponding to the id in parameter