ORCA: Optimization-based framework for Robotic Control Applications
Classes | Namespaces | Macros
Factory.h File Reference
#include <memory>
#include <map>
#include <functional>
#include <orca/utils/Utils.h>
#include <orca/common/ConfigurableOrcaObject.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  orca::common::Factory
 

Namespaces

 orca
 
 orca::common
 

Macros

#define ORCA_REGISTER_CLASS(CLASSNAME, ...)
 

Macro Definition Documentation

◆ ORCA_REGISTER_CLASS

#define ORCA_REGISTER_CLASS (   CLASSNAME,
  ... 
)
Value:
namespace { \
bool ok##__VA_ARGS__ = ::orca::common::Factory::Instance()->registerClass(#CLASSNAME,[](const std::string& name) { return std::make_shared<CLASSNAME>(name); }); \
};
bool registerClass(const std::string &class_name, std::function< std::shared_ptr< ConfigurableOrcaObject >(const std::string &)> f)
Definition: Factory.h:45
static Factory * Instance()
Definition: Factory.h:16