ArVizComponentPlugin.cpp
Go to the documentation of this file.
2
4
5namespace armarx::plugins
6{
7 static const std::string ARVIZ_TOPIC_PROPERTY_NAME = "ArVizTopicName";
8 static const std::string ARVIZ_TOPIC_PROPERTY_DEFAULT = "ArVizTopic";
9
10 static const std::string ARVIZ_STORAGE_PROPERTY_NAME = "ArVizStorageName";
11 static const std::string ARVIZ_STORAGE_PROPERTY_DEFAULT = "ArVizStorage";
12
13 std::string
15 {
16 return parentDerives<Component>() ? parent<Component>().getProperty<std::string>(
17 makePropertyName(ARVIZ_TOPIC_PROPERTY_NAME))
18 : ARVIZ_TOPIC_PROPERTY_DEFAULT;
19 }
20
21 std::string
23 {
24 return parentDerives<Component>() ? parent<Component>().getProperty<std::string>(
25 makePropertyName(ARVIZ_STORAGE_PROPERTY_NAME))
26 : ARVIZ_STORAGE_PROPERTY_DEFAULT;
27 }
28
29 void
35
36 void
44
45 void
47 {
48 if (!properties->hasDefinition(makePropertyName(ARVIZ_TOPIC_PROPERTY_NAME)))
49 {
50 properties->defineOptionalProperty<std::string>(
51 makePropertyName(ARVIZ_TOPIC_PROPERTY_NAME),
52 ARVIZ_TOPIC_PROPERTY_DEFAULT,
53 "Name of the ArViz topic");
54 }
55 if (!properties->hasDefinition(makePropertyName(ARVIZ_STORAGE_PROPERTY_NAME)))
56 {
57 properties->defineOptionalProperty<std::string>(
58 makePropertyName(ARVIZ_STORAGE_PROPERTY_NAME),
59 ARVIZ_STORAGE_PROPERTY_DEFAULT,
60 "Name of the ArViz storage");
61 }
62 }
63
69} // namespace armarx::plugins
70
71namespace armarx
72{
77
80 {
81 return plugin->createClient();
82 }
83} // namespace armarx
std::string makePropertyName(const std::string &name)
void offeringTopic(const std::string &name)
Registers a topic for retrival after initialization.
bool usingProxy(const std::string &name, const std::string &endpoints="")
Registers a proxy for retrieval after initialization and adds it to the dependency list.
PluginT * addPlugin(const std::string prefix="", ParamsT &&... params)
void postCreatePropertyDefinitions(PropertyDefinitionsPtr &properties) override
This file is part of ArmarX.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.