ArmarXObjectsImporter.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 MemoryX::ArmarXObjects::ArmarXObjectsImporter
17  * @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
18  * @date 2021
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
26 
27 #include <MemoryX/interface/components/CommonStorageInterface.h>
28 #include <MemoryX/interface/components/LongtermMemoryInterface.h>
29 #include <MemoryX/interface/components/PriorKnowledgeInterface.h>
30 #include <MemoryX/interface/components/WorkingMemoryInterface.h>
32 
33 
34 namespace memoryx
35 {
36 
37  /**
38  * @defgroup Component-ArmarXObjectsImporter ArmarXObjectsImporter
39  * @ingroup MemoryX-Components
40  * A description of the component ArmarXObjectsImporter.
41  *
42  * @class ArmarXObjectsImporter
43  * @ingroup Component-ArmarXObjectsImporter
44  * @brief Brief description of class ArmarXObjectsImporter.
45  *
46  * Detailed description of class ArmarXObjectsImporter.
47  */
49  virtual public armarx::Component
50  {
51  public:
52 
53  /// @see armarx::ManagedIceObject::getDefaultName()
54  std::string getDefaultName() const override;
55 
56 
57  protected:
58 
59  /// @see PropertyUser::createPropertyDefinitions()
61 
62  /// @see armarx::ManagedIceObject::onInitComponent()
63  void onInitComponent() override;
64 
65  /// @see armarx::ManagedIceObject::onConnectComponent()
66  void onConnectComponent() override;
67 
68  /// @see armarx::ManagedIceObject::onDisconnectComponent()
69  void onDisconnectComponent() override;
70 
71  /// @see armarx::ManagedIceObject::onExitComponent()
72  void onExitComponent() override;
73 
74 
75 
76  private:
77 
78 
79  /// Properties shown in the Scenario GUI.
80  struct Properties
81  {
82  Properties();
83 
84  std::string mongoDbName = "CeBITdb";
85  bool dryRun = false;
86 
87  bool importObjects = true;
88  std::string objectsRepository; // Set in constructor
89  std::string datasetName = "";
90  std::string className = "";
91 
92  bool importScenes = true;
93  std::string scenesDirectory; // Set in constructor
94  std::string sceneNames;
95  };
96  Properties properties;
97 
98 
99  struct Proxies
100  {
101  memoryx::CommonStorageInterfacePrx commonStorage;
102  memoryx::PriorKnowledgeInterfacePrx priorKnowledge;
103  memoryx::WorkingMemoryInterfacePrx workingMemory;
104  memoryx::LongtermMemoryInterfacePrx longtermMemory;
105  };
106  Proxies proxies;
107 
108  memoryx::GridFileManagerPtr gridFileManager;
109 
110  };
111 }
memoryx::ArmarXObjectsImporter::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: ArmarXObjectsImporter.cpp:38
GridFileManager.h
memoryx
VirtualRobot headers.
Definition: CommonPlacesTester.cpp:48
memoryx::ArmarXObjectsImporter::onDisconnectComponent
void onDisconnectComponent() override
Definition: ArmarXObjectsImporter.cpp:155
memoryx::ArmarXObjectsImporter::onConnectComponent
void onConnectComponent() override
Definition: ArmarXObjectsImporter.cpp:83
Component.h
armarx::Component
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition: Component.h:95
memoryx::GridFileManagerPtr
std::shared_ptr< GridFileManager > GridFileManagerPtr
Definition: AbstractEntityWrapper.h:32
memoryx::ArmarXObjectsImporter
Brief description of class ArmarXObjectsImporter.
Definition: ArmarXObjectsImporter.h:48
IceUtil::Handle< class PropertyDefinitionContainer >
memoryx::ArmarXObjectsImporter::onExitComponent
void onExitComponent() override
Definition: ArmarXObjectsImporter.cpp:160
memoryx::ArmarXObjectsImporter::getDefaultName
std::string getDefaultName() const override
Definition: ArmarXObjectsImporter.cpp:165
memoryx::ArmarXObjectsImporter::onInitComponent
void onInitComponent() override
Definition: ArmarXObjectsImporter.cpp:78