Classes | Namespaces | Macros
factory.h File Reference
#include <map>
#include <memory>
#include <typeinfo>
#include <exotica_core/object.h>
#include <exotica_core/tools.h>
#include <pluginlib/class_list_macros.h>
Include dependency graph for factory.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  exotica::Factory< BaseClass >
 Templated Object factory for Default-constructible classes. The Factory is itself a singleton. More...
 
class  exotica::Registrar< BaseClass >
 Registration Class for the object type: Also templated: More...
 
class  exotica::Registrar< BaseClass >
 Registration Class for the object type: Also templated: More...
 

Namespaces

 exotica
 

Macros

#define EXOTICA_CORE_REGISTER(BASE, TYPE, DERIV)
 Generic Factory Macro definition: to be specialised by each new base type which wishes to make use of a factory for instantiation of derived classes. More...
 
#define EXOTICA_CORE_REGISTER_CORE(BASE, TYPE, DERIV)   static exotica::Registrar<BASE> EX_UNIQ(object_registrar_, __LINE__)("exotica/" TYPE, []() -> BASE* { return new DERIV(); }, #BASE);
 

Macro Definition Documentation

#define EXOTICA_CORE_REGISTER (   BASE,
  TYPE,
  DERIV 
)
Value:
static exotica::Registrar<BASE> EX_UNIQ(object_registrar_, __LINE__)("exotica/" TYPE, []() -> BASE* { return new DERIV(); }, #BASE); \
PLUGINLIB_EXPORT_CLASS(DERIV, BASE)
#define EX_UNIQ(x, y)
Definition: tools.h:60
Registration Class for the object type: Also templated:
Definition: factory.h:56

Generic Factory Macro definition: to be specialised by each new base type which wishes to make use of a factory for instantiation of derived classes.

Parameters
IDENTIdentifier Type : should be specialised by redefining a macro
BASEBase Object type : should be specialised by redefining a macro
TYPEThe name to identify the class (should be of type IDENT)
DERIVThe Derived Class type (should inherit from BASE)

Definition at line 47 of file factory.h.

#define EXOTICA_CORE_REGISTER_CORE (   BASE,
  TYPE,
  DERIV 
)    static exotica::Registrar<BASE> EX_UNIQ(object_registrar_, __LINE__)("exotica/" TYPE, []() -> BASE* { return new DERIV(); }, #BASE);

Definition at line 51 of file factory.h.



exotica_core
Author(s): Yiming Yang, Michael Camilleri
autogenerated on Sat Apr 10 2021 02:34:49