sofa::core::ObjectFactory::Creator Class Reference

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

#include <ObjectFactory.h>

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

Inheritance graph
[legend]

Public Member Functions

virtual ~Creator ()
virtual bool canCreate (objectmodel::BaseContext *context, objectmodel::BaseObjectDescription *arg)=0
 Pre-construction check.
virtual objectmodel::BaseObject * createInstance (objectmodel::BaseContext *context, objectmodel::BaseObjectDescription *arg)=0
 Construction method called by the factory.
virtual const std::type_info & type ()=0
 type_info structure associated with the type of intanciated objects.

Detailed Description

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

Definition at line 79 of file ObjectFactory.h.


Constructor & Destructor Documentation

virtual sofa::core::ObjectFactory::Creator::~Creator (  )  [inline, virtual]

Definition at line 82 of file ObjectFactory.h.


Member Function Documentation

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

Referenced by sofa::gui::qt::GraphModeler::addComponent(), and sofa::core::ObjectFactory::createObject().

virtual objectmodel::BaseObject* 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 >.

Referenced by sofa::gui::qt::GraphModeler::addComponent(), and projects::generateFactoryPHPDoc().

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


The documentation for this class was generated from the following file:

Generated on Sun Nov 23 04:22:07 2008 for Sofa by  doxygen 1.5.7.1