Classes | Namespaces | Defines | Variables

factory.h File Reference

Include dependency graph for factory.h:

Classes

class  dynamicgraph::FactoryStorage
 The Factory class is responsible for creating Entity objects. More...
class  dynamicgraph::EntityRegisterer

Namespaces

namespace  dynamicgraph
 

This is the namespace where every object and class of this library is located.


Defines

#define DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(classType, className)

Variables

DYNAMICGRAPH_EXPORT FactoryStorage dynamicgraph::g_factory

Define Documentation

#define DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN (   classType,
  className 
)
Value:
const std::string classType::CLASS_NAME = className; \
  extern "C" {                                            \
    Entity *EntityMaker##_##classType( const std::string& objname )    \
    {                                                     \
      return new classType( objname );                 \
    }                                                     \
  EntityRegisterer reg##_##classType( className,    \
              &EntityMaker##_##classType );   \
  }                                                       \

This macro should be used to automatically register an entity of classType to the g_factory. It is then possible to create it with the g_factory.





dynamicGraph library documentation