Hosted by: BerliOS Developer Logo

OpenMBV C++ Interface

BerliOS Project Page
Static Public Member Functions
OpenMBV::ObjectFactory Class Reference

A object factory. More...

#include <objectfactory.h>

List of all members.

Static Public Member Functions

template<class CreateType >
static void registerXMLName (const std::string &name)
 Register the class CreateType which the XML element name name by the object factory.
template<class ContainerType >
static ContainerType * create (const MBXMLUtils::TiXmlElement *element)
 Create an object corresponding to the XML element element and return a pointer of type ContainerType.

Detailed Description

A object factory.

A object facroty which creates any object derived from Object.


Member Function Documentation

template<class ContainerType >
static ContainerType* OpenMBV::ObjectFactory::create ( const MBXMLUtils::TiXmlElement *  element) [inline, static]

Create an object corresponding to the XML element element and return a pointer of type ContainerType.

Throws if the created object is not of type ContainerType. This function returns a new object dependent on the registration of the created object.

template<class CreateType >
static void OpenMBV::ObjectFactory::registerXMLName ( const std::string &  name) [inline, static]

Register the class CreateType which the XML element name name by the object factory.

You should not use this function directly but see also the macro OPENMBV_OBJECTFACTORY_REGISTERXMLNAME.


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