SOFA API  014b24ea
Open source framework for multi-physics simuation
sofa::core::Plugin Class Reference

#include <Plugin.h>

Classes

struct  ComponentEntry
 
class  RegisterObject
 

Public Member Functions

 Plugin (std::string name, bool isLegacy=false)
 
 Plugin (const std::string &name, const std::string &description, const std::string &version, const std::string &license, const std::string &authors, bool isLegacy=false)
 
virtual ~Plugin ()
 
virtual bool init ()
 
virtual bool exit ()
 
virtual bool canBeUnloaded ()
 
const ComponentEntrygetComponentEntry (std::string name)
 Get the ComponentEntry for a component already added to the plugin. More...
 
const ComponentEntryMapgetComponentEntries () const
 Get the map containing the information about the plugin's components. More...
 
const std::string & getName () const
 
const std::string & getDescription () const
 
const std::string & getVersion () const
 
const std::string & getLicense () const
 
const std::string & getAuthors () const
 
bool isLegacy () const
 

Protected Member Functions

template<class Component >
ComponentEntryaddComponent (const std::string &description="")
 Add a component. More...
 
template<class Component >
void addTemplateInstance ()
 Add an instanciation of a class template. More...
 
void setDescription (std::string componentName, std::string description)
 Set the description of a component that already has an entry. More...
 
void addAlias (std::string componentName, std::string alias)
 Add an alias for a component that already has an entry. More...
 
void setDescription (const std::string &description)
 
void setVersion (const std::string &version)
 
void setLicense (const std::string &license)
 
void setAuthors (const std::string &authors)
 

Constructor details

sofa::core::Plugin::Plugin ( std::string  name,
bool  isLegacy = false 
)
inline
sofa::core::Plugin::Plugin ( const std::string &  name,
const std::string &  description,
const std::string &  version,
const std::string &  license,
const std::string &  authors,
bool  isLegacy = false 
)
inline
virtual sofa::core::Plugin::~Plugin ( )
inlinevirtual

Function details

void sofa::core::Plugin::addAlias ( std::string  componentName,
std::string  alias 
)
protected

Add an alias for a component that already has an entry.

template<class Component >
ComponentEntry& sofa::core::Plugin::addComponent ( const std::string &  description = "")
inlineprotected

Add a component.

template<class Component >
void sofa::core::Plugin::addTemplateInstance ( )
inlineprotected

Add an instanciation of a class template.

virtual bool sofa::core::Plugin::canBeUnloaded ( )
inlinevirtual
virtual bool sofa::core::Plugin::exit ( )
inlinevirtual
const std::string& sofa::core::Plugin::getAuthors ( ) const
inline
const ComponentEntryMap& sofa::core::Plugin::getComponentEntries ( ) const
inline

Get the map containing the information about the plugin's components.

const Plugin::ComponentEntry & sofa::core::Plugin::getComponentEntry ( std::string  name)

Get the ComponentEntry for a component already added to the plugin.

const std::string& sofa::core::Plugin::getDescription ( ) const
inline
const std::string& sofa::core::Plugin::getLicense ( ) const
inline
const std::string& sofa::core::Plugin::getName ( ) const
inline
const std::string& sofa::core::Plugin::getVersion ( ) const
inline
virtual bool sofa::core::Plugin::init ( void  )
inlinevirtual
bool sofa::core::Plugin::isLegacy ( ) const
inline
void sofa::core::Plugin::setAuthors ( const std::string &  authors)
inlineprotected
void sofa::core::Plugin::setDescription ( std::string  componentName,
std::string  description 
)
protected

Set the description of a component that already has an entry.

void sofa::core::Plugin::setDescription ( const std::string &  description)
inlineprotected
void sofa::core::Plugin::setLicense ( const std::string &  license)
inlineprotected
void sofa::core::Plugin::setVersion ( const std::string &  version)
inlineprotected