SOFA API  1a4bb3e7
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

◆ components

VecComponent sofa::core::CategoryLibrary::components
protected

◆ name

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

Constructor details

◆ CategoryLibrary()

sofa::core::CategoryLibrary::CategoryLibrary ( const std::string &  categoryName)

◆ ~CategoryLibrary()

virtual sofa::core::CategoryLibrary::~CategoryLibrary ( )
inlinevirtual

Function details

◆ addComponent()

ComponentLibrary * sofa::core::CategoryLibrary::addComponent ( const std::string &  componentName,
ClassEntry::SPtr  entry,
const std::vector< std::string > &  exampleFiles 
)
virtual

◆ createComponent()

virtual ComponentLibrary* sofa::core::CategoryLibrary::createComponent ( const std::string &  componentName,
ClassEntry::SPtr  entry,
const std::vector< std::string > &  exampleFiles 
)
inlineprotectedvirtual

◆ endConstruction()

void sofa::core::CategoryLibrary::endConstruction ( )
virtual

◆ getCategories() [1/2]

std::vector< std::string > sofa::core::CategoryLibrary::getCategories ( )
static

◆ getCategories() [2/2]

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

◆ getComponent()

const ComponentLibrary * sofa::core::CategoryLibrary::getComponent ( const std::string &  componentName) const

◆ getComponents()

const VecComponent& sofa::core::CategoryLibrary::getComponents ( ) const
inline

◆ getName()

const std::string& sofa::core::CategoryLibrary::getName ( ) const
inline

◆ getNumComponents()

size_t sofa::core::CategoryLibrary::getNumComponents ( ) const
inline