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