SemanticGraphStorage.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package VisionX::ArmarXObjects::SemanticGraphStorage
17  * @author Fabian Paus ( fabian dot paus at kit dot edu )
18  * @date 2019
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
25 
26 #include <map>
27 #include <mutex>
28 
30 
31 #include <VisionX/interface/libraries/SemanticObjectRelations/GraphStorage.h>
32 
33 namespace armarx
34 {
35  /**
36  * @class SemanticGraphStoragePropertyDefinitions
37  * @brief
38  */
40  {
41  public:
43  };
44 
45  /**
46  * @defgroup Component-SemanticGraphStorage SemanticGraphStorage
47  * @ingroup VisionX-Components
48  * A description of the component SemanticGraphStorage.
49  *
50  * @class SemanticGraphStorage
51  * @ingroup Component-SemanticGraphStorage
52  * @brief Brief description of class SemanticGraphStorage.
53  *
54  * Detailed description of class SemanticGraphStorage.
55  */
57  virtual public armarx::Component,
58  virtual public armarx::semantic::GraphStorageTopicAndInterface
59  {
60  public:
61  /// @see armarx::ManagedIceObject::getDefaultName()
62  virtual std::string getDefaultName() const override;
63 
64  // GraphStorageInterface interface
65  semantic::data::GraphMap getAll(const Ice::Current&) override;
66  void remove(const std::string& id, const Ice::Current&) override;
67  void removeAll(const Ice::Current&) override;
68 
69  // GraphStorageTopic interface
70  void reportGraph(std::string const& id,
71  semantic::data::Graph const& graph,
72  const Ice::Current&) override;
73 
74  protected:
75  /// @see armarx::ManagedIceObject::onInitComponent()
76  virtual void onInitComponent() override;
77 
78  /// @see armarx::ManagedIceObject::onConnectComponent()
79  virtual void onConnectComponent() override;
80 
81  /// @see armarx::ManagedIceObject::onDisconnectComponent()
82  virtual void onDisconnectComponent() override;
83 
84  /// @see armarx::ManagedIceObject::onExitComponent()
85  virtual void onExitComponent() override;
86 
87  /// @see PropertyUser::createPropertyDefinitions()
89 
90 
91  private:
92  std::mutex graphsMutex;
93  semantic::data::GraphMap graphs;
94  };
95 } // namespace armarx
armarx::SemanticGraphStorage::remove
void remove(const std::string &id, const Ice::Current &) override
Definition: SemanticGraphStorage.cpp:73
armarx::SemanticGraphStoragePropertyDefinitions::SemanticGraphStoragePropertyDefinitions
SemanticGraphStoragePropertyDefinitions(std::string prefix)
Definition: SemanticGraphStorage.cpp:27
armarx::SemanticGraphStorage::onExitComponent
virtual void onExitComponent() override
Definition: SemanticGraphStorage.cpp:60
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:345
armarx::SemanticGraphStorage::createPropertyDefinitions
virtual armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: SemanticGraphStorage.cpp:101
armarx::SemanticGraphStorage::getAll
semantic::data::GraphMap getAll(const Ice::Current &) override
Definition: SemanticGraphStorage.cpp:65
armarx::SemanticGraphStorage::onInitComponent
virtual void onInitComponent() override
Definition: SemanticGraphStorage.cpp:44
armarx::SemanticGraphStorage::onConnectComponent
virtual void onConnectComponent() override
Definition: SemanticGraphStorage.cpp:50
armarx::SemanticGraphStorage::onDisconnectComponent
virtual void onDisconnectComponent() override
Definition: SemanticGraphStorage.cpp:55
armarx::SemanticGraphStorage::reportGraph
void reportGraph(std::string const &id, semantic::data::Graph const &graph, const Ice::Current &) override
Definition: SemanticGraphStorage.cpp:89
armarx::Graph
boost::subgraph< CloudGraph > Graph
Definition: Common.h:58
Component.h
armarx::Component
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition: Component.h:91
armarx::ComponentPropertyDefinitions
Default component property definition container.
Definition: Component.h:69
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::SemanticGraphStorage
Brief description of class SemanticGraphStorage.
Definition: SemanticGraphStorage.h:56
armarx::SemanticGraphStorage::getDefaultName
virtual std::string getDefaultName() const override
Definition: SemanticGraphStorage.cpp:38
armarx::SemanticGraphStoragePropertyDefinitions
Definition: SemanticGraphStorage.h:39
armarx::SemanticGraphStorage::removeAll
void removeAll(const Ice::Current &) override
Definition: SemanticGraphStorage.cpp:81
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27