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 
27 
28 #include <VisionX/interface/libraries/SemanticObjectRelations/GraphStorage.h>
29 
30 #include <map>
31 #include <mutex>
32 
33 namespace armarx
34 {
35  /**
36  * @class SemanticGraphStoragePropertyDefinitions
37  * @brief
38  */
41  {
42  public:
44  };
45 
46 
47 
48  /**
49  * @defgroup Component-SemanticGraphStorage SemanticGraphStorage
50  * @ingroup VisionX-Components
51  * A description of the component SemanticGraphStorage.
52  *
53  * @class SemanticGraphStorage
54  * @ingroup Component-SemanticGraphStorage
55  * @brief Brief description of class SemanticGraphStorage.
56  *
57  * Detailed description of class SemanticGraphStorage.
58  */
60  : virtual public armarx::Component
61  , virtual public armarx::semantic::GraphStorageTopicAndInterface
62  {
63  public:
64 
65  /// @see armarx::ManagedIceObject::getDefaultName()
66  virtual std::string getDefaultName() const override;
67 
68  // GraphStorageInterface interface
69  semantic::data::GraphMap getAll(const Ice::Current&) override;
70  void remove(const std::string& id, const Ice::Current&) override;
71  void removeAll(const Ice::Current&) override;
72 
73  // GraphStorageTopic interface
74  void reportGraph(std::string const& id, semantic::data::Graph const& graph, const Ice::Current&) override;
75 
76  protected:
77 
78  /// @see armarx::ManagedIceObject::onInitComponent()
79  virtual void onInitComponent() override;
80 
81  /// @see armarx::ManagedIceObject::onConnectComponent()
82  virtual void onConnectComponent() override;
83 
84  /// @see armarx::ManagedIceObject::onDisconnectComponent()
85  virtual void onDisconnectComponent() override;
86 
87  /// @see armarx::ManagedIceObject::onExitComponent()
88  virtual void onExitComponent() override;
89 
90  /// @see PropertyUser::createPropertyDefinitions()
92 
93 
94  private:
95  std::mutex graphsMutex;
96  semantic::data::GraphMap graphs;
97  };
98 }
armarx::SemanticGraphStorage::remove
void remove(const std::string &id, const Ice::Current &) override
Definition: SemanticGraphStorage.cpp:70
armarx::SemanticGraphStoragePropertyDefinitions::SemanticGraphStoragePropertyDefinitions
SemanticGraphStoragePropertyDefinitions(std::string prefix)
Definition: SemanticGraphStorage.cpp:28
armarx::SemanticGraphStorage::onExitComponent
virtual void onExitComponent() override
Definition: SemanticGraphStorage.cpp:58
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:333
armarx::SemanticGraphStorage::createPropertyDefinitions
virtual armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: SemanticGraphStorage.cpp:94
armarx::SemanticGraphStorage::getAll
semantic::data::GraphMap getAll(const Ice::Current &) override
Definition: SemanticGraphStorage.cpp:63
armarx::SemanticGraphStorage::onInitComponent
virtual void onInitComponent() override
Definition: SemanticGraphStorage.cpp:41
armarx::SemanticGraphStorage::onConnectComponent
virtual void onConnectComponent() override
Definition: SemanticGraphStorage.cpp:47
armarx::SemanticGraphStorage::onDisconnectComponent
virtual void onDisconnectComponent() override
Definition: SemanticGraphStorage.cpp:52
armarx::SemanticGraphStorage::reportGraph
void reportGraph(std::string const &id, semantic::data::Graph const &graph, const Ice::Current &) override
Definition: SemanticGraphStorage.cpp:84
armarx::Graph
boost::subgraph< CloudGraph > Graph
Definition: Common.h:54
Component.h
armarx::Component
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition: Component.h:95
armarx::ComponentPropertyDefinitions
Default component property definition container.
Definition: Component.h:70
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::SemanticGraphStorage
Brief description of class SemanticGraphStorage.
Definition: SemanticGraphStorage.h:59
armarx::SemanticGraphStorage::getDefaultName
virtual std::string getDefaultName() const override
Definition: SemanticGraphStorage.cpp:35
armarx::SemanticGraphStoragePropertyDefinitions
Definition: SemanticGraphStorage.h:39
armarx::SemanticGraphStorage::removeAll
void removeAll(const Ice::Current &) override
Definition: SemanticGraphStorage.cpp:77
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28