SOFA API  cd4ffb93
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 chargetTarget () override
 The name of the library or executable containing the binary code for this component. More...
 
const chargetHeaderFileLocation () override
 
- Public Member Functions inherited from sofa::core::ObjectFactory::Creator
virtual ~Creator ()
 

Function details

◆ canCreate()

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.

◆ createInstance()

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.

◆ getClass()

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.

◆ getHeaderFileLocation()

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

◆ getTarget()

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.

◆ type()

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.