Decoupled.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
5#include <Ice/PropertiesF.h>
6
8
9namespace armarx
10{
11
13 std::string const& configName,
14 std::string const& configDomain);
15
16 struct Decoupled
17 {
18 template <typename ComponentT>
19 static bool
20 registerComponent(std::string const& name)
21 {
23 }
24
26 std::string const& name);
27 };
28
29#define ARMARX_REGISTER_COMPONENT_EXECUTABLE(ComponentT, applicationName) \
30 const static bool global_register_##Component = \
31 ::armarx::Decoupled::registerComponent<ComponentT>(applicationName)
32
33
34#define ARMARX_DECOUPLED_REGISTER_COMPONENT(ComponentT) \
35 ARMARX_REGISTER_COMPONENT_EXECUTABLE(ComponentT, (#ComponentT))
36
37} // namespace armarx
static TPtr create(Ice::PropertiesPtr properties=Ice::createProperties(), const std::string &configName="", const std::string &configDomain="ArmarX")
Factory method for a component.
Definition Component.h:116
::IceInternal::Handle<::Ice::Properties > PropertiesPtr
This file offers overloads of toIce() and fromIce() functions for STL container types.
armarx::ComponentPtr CreateComponentFunction(Ice::PropertiesPtr properties, std::string const &configName, std::string const &configDomain)
Definition Decoupled.h:12
IceInternal::Handle< Component > ComponentPtr
Component smart pointer type.
Definition ArmarXFwd.h:45
static bool registerComponent(std::string const &name)
Definition Decoupled.h:20
static bool setCreateComponentFunction(CreateComponentFunction *function, std::string const &name)
Definition Decoupled.cpp:13