Decoupled.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include <Ice/PropertiesF.h>
6 
7 #include <string>
8 
9 namespace 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 registerComponent(std::string const& name)
20  {
21  return setCreateComponentFunction(&armarx::Component::create<ComponentT>,
22  name);
23  }
24 
26  std::string const& name);
27  };
28 
29 
30 
31 #define ARMARX_REGISTER_COMPONENT_EXECUTABLE(ComponentT, applicationName) \
32  const static bool global_register_ ## Component = ::armarx::Decoupled::registerComponent< ComponentT >( applicationName )
33 
34 
35 #define ARMARX_DECOUPLED_REGISTER_COMPONENT(ComponentT) \
36  ARMARX_REGISTER_COMPONENT_EXECUTABLE( ComponentT, (#ComponentT) )
37 
38 }
armarx::Decoupled::setCreateComponentFunction
static bool setCreateComponentFunction(CreateComponentFunction *function, std::string const &name)
Definition: Decoupled.cpp:12
armarx::CreateComponentFunction
armarx::ComponentPtr CreateComponentFunction(Ice::PropertiesPtr properties, std::string const &configName, std::string const &configDomain)
Definition: Decoupled.h:12
IceInternal::Handle
Definition: forward_declarations.h:8
Component.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::Decoupled::registerComponent
static bool registerComponent(std::string const &name)
Definition: Decoupled.h:19
armarx::Decoupled
Definition: Decoupled.h:16