core/utility/plugins/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

namespace  argos
 

The namespace containing all the ARGoS related code.


Defines

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

Define Documentation

#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; \
   }

Macro to register a symbol into the factory.

Parameters:
BASECLASS The base class of the hiearchy of types to register (corresponds to TYPE in the factory)
CLASSNAME The actual class to register
LABEL The label to associate to CLASSNAME
AUTHOR The author of the class CLASSNAME
VERSION Version information for the code in CLASSNAME
BRIEF_DESCRIPTION A brief description of what CLASSNAME is
LONG_DESCRIPTION A detailed description of what CLASSNAME is and does
STATUS Status information (usable, draft, todos, etc) for the code in CLASSNAME

Definition at line 156 of file factory.h.


Generated on 10 Jul 2018 for ARGoS by  doxygen 1.6.1