SOFA API  1a4bb3e7
Open source framework for multi-physics simuation
sofa::core::ObjectFactory::Creator Class Referenceabstract

#include <ObjectFactory.h>

Abstract interface of objects used to create instances of a given type. More...

Inheritance diagram for sofa::core::ObjectFactory::Creator:

Detailed Description

Abstract interface of objects used to create instances of a given type.

Public Member Functions

virtual ~Creator ()
 
virtual bool canCreate (objectmodel::BaseContext *context, objectmodel::BaseObjectDescription *arg)=0
 
virtual objectmodel::BaseObject::SPtr createInstance (objectmodel::BaseContext *context, objectmodel::BaseObjectDescription *arg)=0
 
virtual const std::type_info & type ()=0
 type_info structure associated with the type of intanciated objects. More...
 
virtual const objectmodel::BaseClassgetClass ()=0
 BaseClass structure associated with the type of intanciated objects. More...
 
virtual const chargetTarget ()=0
 The name of the library or executable containing the binary code for this component. More...
 
virtual const chargetHeaderFileLocation ()=0
 

Constructor details

◆ ~Creator()

virtual sofa::core::ObjectFactory::Creator::~Creator ( )
inlinevirtual

Function details

◆ canCreate()

virtual bool sofa::core::ObjectFactory::Creator::canCreate ( objectmodel::BaseContext context,
objectmodel::BaseObjectDescription arg 
)
pure virtual

Pre-construction check.

Returns
true if the object can be created successfully.

Implemented in sofa::core::ObjectCreator< RealObject >.

◆ createInstance()

virtual objectmodel::BaseObject::SPtr sofa::core::ObjectFactory::Creator::createInstance ( objectmodel::BaseContext context,
objectmodel::BaseObjectDescription arg 
)
pure virtual

Construction method called by the factory.

Precondition
canCreate(context, arg) == true.

Implemented in sofa::core::ObjectCreator< RealObject >.

◆ getClass()

virtual const objectmodel::BaseClass* sofa::core::ObjectFactory::Creator::getClass ( )
pure virtual

BaseClass structure associated with the type of intanciated objects.

Implemented in sofa::core::ObjectCreator< RealObject >.

◆ getHeaderFileLocation()

virtual const char* sofa::core::ObjectFactory::Creator::getHeaderFileLocation ( )
pure virtual

◆ getTarget()

virtual const char* sofa::core::ObjectFactory::Creator::getTarget ( )
pure virtual

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

Implemented in sofa::core::ObjectCreator< RealObject >.

◆ type()

virtual const std::type_info& sofa::core::ObjectFactory::Creator::type ( )
pure virtual

type_info structure associated with the type of intanciated objects.

Implemented in sofa::core::ObjectCreator< RealObject >.