SOFA API  ca665544
Open source framework for multi-physics simuation
sofa::core::SofaLibrary Class Reference

#include <SofaLibrary.h>

An Generic Library. More...

Detailed Description

An Generic Library.

It reads the content of the Object Factory and builds a library of components sorted inside categories. This Interface is used for the Modeler mainly.

Protected Attributes

VecCategory categories
 
std::vector< std::string > exampleFiles
 
unsigned int numComponents
 

Public Member Functions

virtual ~SofaLibrary ()
 
virtual void build (const std::vector< std::string > &examples=std::vector< std::string >())
 
virtual void clear ()
 
std::string getComponentDescription (const std::string &componentName) const
 
const VecCategorygetCategories () const
 
const CategoryLibrarygetCategory (const std::string &categoryName) const
 
const ComponentLibrarygetComponent (const std::string &componentName) const
 
unsigned int getNumComponents () const
 

Protected Member Functions

virtual CategoryLibrarycreateCategory (const std::string &category, unsigned int)
 
virtual void addCategory (CategoryLibrary *)
 
void computeNumComponents ()
 

Attribute details

◆ categories

VecCategory sofa::core::SofaLibrary::categories
protected

◆ exampleFiles

std::vector< std::string > sofa::core::SofaLibrary::exampleFiles
protected

◆ numComponents

unsigned int sofa::core::SofaLibrary::numComponents
protected

Constructor details

◆ ~SofaLibrary()

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

Function details

◆ addCategory()

void sofa::core::SofaLibrary::addCategory ( CategoryLibrary category)
protectedvirtual

◆ build()

void sofa::core::SofaLibrary::build ( const std::vector< std::string > &  examples = std::vector< std::string >())
virtual

◆ clear()

void sofa::core::SofaLibrary::clear ( )
virtual

◆ computeNumComponents()

void sofa::core::SofaLibrary::computeNumComponents ( )
protected

◆ createCategory()

virtual CategoryLibrary* sofa::core::SofaLibrary::createCategory ( const std::string &  category,
unsigned int   
)
inlineprotectedvirtual

◆ getCategories()

const VecCategory& sofa::core::SofaLibrary::getCategories ( ) const
inline

◆ getCategory()

const CategoryLibrary * sofa::core::SofaLibrary::getCategory ( const std::string &  categoryName) const

◆ getComponent()

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

◆ getComponentDescription()

std::string sofa::core::SofaLibrary::getComponentDescription ( const std::string &  componentName) const

◆ getNumComponents()

unsigned int sofa::core::SofaLibrary::getNumComponents ( ) const
inline