SemanticGraphStorageComponentPlugin.cpp
Go to the documentation of this file.
2 
3 #include <VirtualRobot/VirtualRobot.h>
4 
6 
8 
9 namespace armarx
10 {
11  namespace plugins
12  {
13 
14  void
16  {
17  parent<Component>().offeringTopicFromProperty(PROPERTY_NAME);
18  }
19 
20  void
22  {
23  parent<Component>().getTopicFromProperty(topic, PROPERTY_NAME);
24  }
25 
26  void
28  PropertyDefinitionsPtr& properties)
29  {
30  if (!properties->hasDefinition(PROPERTY_NAME))
31  {
32  properties->defineOptionalProperty<std::string>(
33  PROPERTY_NAME, "SemanticGraphTopic", "Name of the SemanticGraphTopic");
34  }
35  }
36 
37  } // namespace plugins
38 
40  {
41  addPlugin(plugin);
42  }
43 
44  const semantic::GraphStorageTopicPrx&
46  {
47  return plugin->topic;
48  }
49 
50  void
52  std::string const& name,
53  const semrel::AttributedGraph& graph)
54  {
56  getGraphStorageTopic()->reportGraph(name, iceGraph);
57  }
58 
59 } // namespace armarx
armarx::ManagedIceObject::addPlugin
PluginT * addPlugin(const std::string prefix="", ParamsT &&... params)
Definition: ManagedIceObject.h:186
armarx::plugins::SemanticGraphStorageComponentPlugin::PROPERTY_NAME
static constexpr const char * PROPERTY_NAME
Definition: SemanticGraphStorageComponentPlugin.h:25
armarx::SemanticGraphStorageComponentPluginUser::storeGraph
void storeGraph(std::string const &name, semrel::AttributedGraph const &graph)
Definition: SemanticGraphStorageComponentPlugin.cpp:51
plugins
armarx::semantic::toIce
data::Graph toIce(const semrel::AttributedGraph &input)
Definition: graph.cpp:15
armarx::plugins::SemanticGraphStorageComponentPlugin::preOnInitComponent
void preOnInitComponent() override
Definition: SemanticGraphStorageComponentPlugin.cpp:15
armarx::SemanticGraphStorageComponentPluginUser::getGraphStorageTopic
armarx::semantic::GraphStorageTopicPrx const & getGraphStorageTopic()
Definition: SemanticGraphStorageComponentPlugin.cpp:45
armarx::Graph
boost::subgraph< CloudGraph > Graph
Definition: Common.h:58
Component.h
armarx::SemanticGraphStorageComponentPluginUser::SemanticGraphStorageComponentPluginUser
SemanticGraphStorageComponentPluginUser()
Definition: SemanticGraphStorageComponentPlugin.cpp:39
armarx::plugins::SemanticGraphStorageComponentPlugin::topic
armarx::semantic::GraphStorageTopicPrx topic
Definition: SemanticGraphStorageComponentPlugin.h:27
armarx::plugins::SemanticGraphStorageComponentPlugin::postCreatePropertyDefinitions
void postCreatePropertyDefinitions(PropertyDefinitionsPtr &properties) override
Definition: SemanticGraphStorageComponentPlugin.cpp:27
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::plugins::SemanticGraphStorageComponentPlugin::preOnConnectComponent
void preOnConnectComponent() override
Definition: SemanticGraphStorageComponentPlugin.cpp:21
SemanticGraphStorageComponentPlugin.h
ice_serialization.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27