SOFA API  3944ba52
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 std::string shortName (objectmodel::BaseObjectDescription *arg)=0
 
virtual const char * getTarget ()=0
 The name of the library or executable containing the binary code for this component. More...
 
virtual const char * getHeaderFileLocation ()=0
 

Constructor details

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

Function details

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 >.

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 >.

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 >.

virtual const char* sofa::core::ObjectFactory::Creator::getHeaderFileLocation ( )
pure virtual
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 >.

virtual std::string sofa::core::ObjectFactory::Creator::shortName ( objectmodel::BaseObjectDescription arg)
pure virtual
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 >.