SOFA API  3944ba52
Open source framework for multi-physics simuation
sofa::core::ObjectCreator< RealObject > Class Template Reference

#include <ObjectFactory.h>

Typed Creator class used to create instances of object type RealObject. More...

Inheritance diagram for sofa::core::ObjectCreator< RealObject >:

Detailed Description

template<class RealObject>
class sofa::core::ObjectCreator< RealObject >

Typed Creator class used to create instances of object type RealObject.

Public Member Functions

bool canCreate (objectmodel::BaseContext *context, objectmodel::BaseObjectDescription *arg) override
 
objectmodel::BaseObject::SPtr createInstance (objectmodel::BaseContext *context, objectmodel::BaseObjectDescription *arg) override
 
const std::type_info & type () override
 type_info structure associated with the type of intanciated objects. More...
 
const objectmodel::BaseClassgetClass () override
 BaseClass structure associated with the type of intanciated objects. More...
 
const char * getTarget () override
 The name of the library or executable containing the binary code for this component. More...
 
const char * getHeaderFileLocation () override
 
virtual std::string shortName (objectmodel::BaseObjectDescription *arg) override
 
- Public Member Functions inherited from sofa::core::ObjectFactory::Creator
virtual ~Creator ()
 

Function details

template<class RealObject >
bool sofa::core::ObjectCreator< RealObject >::canCreate ( objectmodel::BaseContext context,
objectmodel::BaseObjectDescription arg 
)
inlineoverridevirtual

Pre-construction check.

Returns
true if the object can be created successfully.

Implements sofa::core::ObjectFactory::Creator.

template<class RealObject >
objectmodel::BaseObject::SPtr sofa::core::ObjectCreator< RealObject >::createInstance ( objectmodel::BaseContext context,
objectmodel::BaseObjectDescription arg 
)
inlineoverridevirtual

Construction method called by the factory.

Precondition
canCreate(context, arg) == true.

Implements sofa::core::ObjectFactory::Creator.

template<class RealObject >
const objectmodel::BaseClass* sofa::core::ObjectCreator< RealObject >::getClass ( )
inlineoverridevirtual

BaseClass structure associated with the type of intanciated objects.

Implements sofa::core::ObjectFactory::Creator.

template<class RealObject >
const char* sofa::core::ObjectCreator< RealObject >::getHeaderFileLocation ( )
inlineoverridevirtual
template<class RealObject >
const char* sofa::core::ObjectCreator< RealObject >::getTarget ( )
inlineoverridevirtual

The name of the library or executable containing the binary code for this component.

Implements sofa::core::ObjectFactory::Creator.

template<class RealObject >
virtual std::string sofa::core::ObjectCreator< RealObject >::shortName ( objectmodel::BaseObjectDescription arg)
inlineoverridevirtual
template<class RealObject >
const std::type_info& sofa::core::ObjectCreator< RealObject >::type ( )
inlineoverridevirtual

type_info structure associated with the type of intanciated objects.

Implements sofa::core::ObjectFactory::Creator.