10 static std::string global_name;
14 std::string
const& name)
16 global_createComponent = function;
18 return global_createComponent !=
nullptr;
34 <<
"Component not registered! "
35 <<
"Make sure that the macro "
36 <<
"`ARMARX_REGISTER_COMPONENT_EXECUTABLE(YourComponentName, "
37 "YourComponentName::GetDefaultName());` "
38 <<
"is present in the component source file! "
39 <<
"(If necessary, add the static function `GetDefaultName()` to your component "
43 registry->addObject(global_createComponent(properties,
"",
appConfigDomain));
50 std::string configName =
"";
51 std::string configDomain =
"ArmarX";
52 bool enableLibLoading =
false;
57 app->appConfigDomain = configDomain;
58 app->appConfigName = configName;
59 app->enableLibLoading(enableLibLoading);
60 app->setName(global_name);
61 app->storeCommandLineArguments(argc, argv);
62 return app->main(argc, argv);
Baseclass for all ArmarX applications.
static void setInstance(ApplicationPtr const &inst)
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
::IceInternal::Handle<::Ice::Properties > PropertiesPtr
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< ManagedIceObjectRegistryInterface > ManagedIceObjectRegistryInterfacePtr
int DecoupledMain(int argc, char *argv[])
armarx::ComponentPtr CreateComponentFunction(Ice::PropertiesPtr properties, std::string const &configName, std::string const &configDomain)
std::string appConfigName
std::string appConfigDomain
void setup(const armarx::ManagedIceObjectRegistryInterfacePtr ®istry, Ice::PropertiesPtr properties) override
Setup method to be implemented by user applications.
static bool setCreateComponentFunction(CreateComponentFunction *function, std::string const &name)