factory.h File Reference
#include <argos3/core/utility/configuration/argos_exception.h>
#include <map>
#include <iostream>
#include <string>
#include <cstdlib>
#include <argos3/core/utility/plugins/factory_impl.h>
Include dependency graph for factory.h:

Go to the source code of this file.

Classes

class  argos::CFactory< TYPE >
 Basic factory template. More...
 
struct  argos::CFactory< TYPE >::STypeInfo
 A struct containing the information about the registered types. More...
 

Namespaces

 argos
 The namespace containing all the ARGoS related code.
 

Macros

#define REGISTER_SYMBOL(BASECLASS, CLASSNAME, LABEL, AUTHOR, VERSION, BRIEF_DESCRIPTION, LONG_DESCRIPTION, STATUS)
 Macro to register a symbol into the factory. More...
 

Macro Definition Documentation

◆ REGISTER_SYMBOL

#define REGISTER_SYMBOL (   BASECLASS,
  CLASSNAME,
  LABEL,
  AUTHOR,
  VERSION,
  BRIEF_DESCRIPTION,
  LONG_DESCRIPTION,
  STATUS 
)
Value:
namespace argos { \
extern "C" { \
BASECLASS* BASECLASS ## CLASSNAME ## Creator() { \
return new CLASSNAME; \
} \
} \
class C ## BASECLASS ## CLASSNAME ## Proxy { \
public: \
C ## BASECLASS ## CLASSNAME ## Proxy() { \
CFactory<BASECLASS>:: \
Register(LABEL, \
AUTHOR, \
VERSION, \
BRIEF_DESCRIPTION, \
LONG_DESCRIPTION, \
STATUS, \
BASECLASS ## CLASSNAME ## Creator); \
} \
}; \
C ## BASECLASS ## CLASSNAME ## Proxy BASECLASS ## CLASSNAME ## _p; \
}
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12

Macro to register a symbol into the factory.

Parameters
BASECLASSThe base class of the hiearchy of types to register (corresponds to TYPE in the factory)
CLASSNAMEThe actual class to register
LABELThe label to associate to CLASSNAME
AUTHORThe author of the class CLASSNAME
VERSIONVersion information for the code in CLASSNAME
BRIEF_DESCRIPTIONA brief description of what CLASSNAME is
LONG_DESCRIPTIONA detailed description of what CLASSNAME is and does
STATUSStatus information (usable, draft, todos, etc) for the code in CLASSNAME

Definition at line 149 of file factory.h.