SOFA API  44c2dee7
Open source framework for multi-physics simuation
sofa::core::ObjectFactory::BaseObjectCreator Class Referenceabstract

#include <ObjectFactory.h>

Inheritance diagram for sofa::core::ObjectFactory::BaseObjectCreator:

Detailed Description

Abstract interface used to create instances (object) of a given type See the derived class ObjectCreator.

Public Member Functions

virtual ~BaseObjectCreator ()=default
 
virtual bool canCreate (objectmodel::BaseContext *context, objectmodel::BaseObjectDescription *arg)=0
 
virtual objectmodel::BaseComponent::SPtr createInstance (objectmodel::BaseContext *context, objectmodel::BaseObjectDescription *arg)=0
 
virtual const std::type_info & type ()=0
 type_info structure associated with the type of instantiated objects. More...
 
virtual const objectmodel::BaseClassgetClass ()=0
 BaseClass structure associated with the type of instantiated 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

◆ ~BaseObjectCreator()

virtual sofa::core::ObjectFactory::BaseObjectCreator::~BaseObjectCreator ( )
virtualdefault

Function details

◆ canCreate()

virtual bool sofa::core::ObjectFactory::BaseObjectCreator::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::BaseComponent::SPtr sofa::core::ObjectFactory::BaseObjectCreator::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::BaseObjectCreator::getClass ( )
pure virtual

BaseClass structure associated with the type of instantiated objects.

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

◆ getHeaderFileLocation()

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

◆ getTarget()

virtual const char* sofa::core::ObjectFactory::BaseObjectCreator::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::BaseObjectCreator::type ( )
pure virtual

type_info structure associated with the type of instantiated objects.

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