SOFA API  6a688117
Open source framework for multi-physics simuation
sofa::core::CategoryLibrary Class Reference

#include <CategoryLibrary.h>

An Generic Category of the Sofa Library. More...

Detailed Description

An Generic Category of the Sofa Library.

It contains all the components available for Sofa corresponding to a given category (force field, mass, mapping...) This Interface is used for the Modeler mainly.

Protected Attributes

std::string name
 
VecComponent components
 

Public Member Functions

 CategoryLibrary (const std::string &categoryName)
 
virtual ~CategoryLibrary ()
 
virtual ComponentLibraryaddComponent (const std::string &componentName, ClassEntry::SPtr entry, const std::vector< std::string > &exampleFiles)
 
virtual void endConstruction ()
 
const std::string & getName () const
 
const VecComponentgetComponents () const
 
const ComponentLibrarygetComponent (const std::string &componentName) const
 
size_t getNumComponents () const
 

Static Public Member Functions

static void getCategories (const sofa::core::objectmodel::BaseClass *mclass, std::vector< std::string > &outputVector)
 Get the list of categories a class belongs to, based on its parent classes. More...
 
static std::vector< std::string > getCategories ()
 

Protected Member Functions

virtual ComponentLibrarycreateComponent (const std::string &componentName, ClassEntry::SPtr entry, const std::vector< std::string > &exampleFiles)
 

Attribute details

VecComponent sofa::core::CategoryLibrary::components
protected
std::string sofa::core::CategoryLibrary::name
protected

Constructor details

sofa::core::CategoryLibrary::CategoryLibrary ( const std::string &  categoryName)
virtual sofa::core::CategoryLibrary::~CategoryLibrary ( )
inlinevirtual

Function details

ComponentLibrary * sofa::core::CategoryLibrary::addComponent ( const std::string &  componentName,
ClassEntry::SPtr  entry,
const std::vector< std::string > &  exampleFiles 
)
virtual
virtual ComponentLibrary* sofa::core::CategoryLibrary::createComponent ( const std::string &  componentName,
ClassEntry::SPtr  entry,
const std::vector< std::string > &  exampleFiles 
)
inlineprotectedvirtual
void sofa::core::CategoryLibrary::endConstruction ( )
virtual
void sofa::core::CategoryLibrary::getCategories ( const sofa::core::objectmodel::BaseClass mclass,
std::vector< std::string > &  outputVector 
)
static

Get the list of categories a class belongs to, based on its parent classes.

Parameters
mclassthe class the categorize
outputVectorthe vector where to push the categories

The categories are: AnimationLoop, BehaviorModel, CollisionAlgorithm, CollisionAlgorithm, CollisionAlgorithm, CollisionModel, ConfigurationSetting, ConstraintSet, ConstraintSolver, ConstraintSolver, ContextObject, Controller, Engine, ForceField, InteractionForceField, LinearSolver, Loader, Mapping, Mass, MechanicalState, OdeSolver, ProjectiveConstraintSet, TopologicalMapping, Topology, TopologyObject, and VisualModel

std::vector< std::string > sofa::core::CategoryLibrary::getCategories ( )
static
const ComponentLibrary * sofa::core::CategoryLibrary::getComponent ( const std::string &  componentName) const
const VecComponent& sofa::core::CategoryLibrary::getComponents ( ) const
inline
const std::string& sofa::core::CategoryLibrary::getName ( ) const
inline
size_t sofa::core::CategoryLibrary::getNumComponents ( ) const
inline