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 
28 #include <MemoryX/interface/components/CommonStorageInterface.h>
29 #include <MemoryX/interface/components/LongtermMemoryInterface.h>
30 #include <MemoryX/interface/components/PriorKnowledgeInterface.h>
31 #include <MemoryX/interface/components/WorkingMemoryInterface.h>
32 
33 namespace memoryx
34 {
35 
36  /**
37  * @defgroup Component-ArmarXObjectsImporter ArmarXObjectsImporter
38  * @ingroup MemoryX-Components
39  * A description of the component ArmarXObjectsImporter.
40  *
41  * @class ArmarXObjectsImporter
42  * @ingroup Component-ArmarXObjectsImporter
43  * @brief Brief description of class ArmarXObjectsImporter.
44  *
45  * Detailed description of class ArmarXObjectsImporter.
46  */
48  {
49  public:
50  /// @see armarx::ManagedIceObject::getDefaultName()
51  std::string getDefaultName() const override;
52 
53 
54  protected:
55  /// @see PropertyUser::createPropertyDefinitions()
57 
58  /// @see armarx::ManagedIceObject::onInitComponent()
59  void onInitComponent() override;
60 
61  /// @see armarx::ManagedIceObject::onConnectComponent()
62  void onConnectComponent() override;
63 
64  /// @see armarx::ManagedIceObject::onDisconnectComponent()
65  void onDisconnectComponent() override;
66 
67  /// @see armarx::ManagedIceObject::onExitComponent()
68  void onExitComponent() override;
69 
70 
71  private:
72  /// Properties shown in the Scenario GUI.
73  struct Properties
74  {
75  Properties();
76 
77  std::string mongoDbName = "CeBITdb";
78  bool dryRun = false;
79 
80  bool importObjects = true;
81  std::string objectsRepository; // Set in constructor
82  std::string datasetName = "";
83  std::string className = "";
84 
85  bool importScenes = true;
86  std::string scenesDirectory; // Set in constructor
87  std::string sceneNames;
88  };
89 
90  Properties properties;
91 
92  struct Proxies
93  {
94  memoryx::CommonStorageInterfacePrx commonStorage;
95  memoryx::PriorKnowledgeInterfacePrx priorKnowledge;
96  memoryx::WorkingMemoryInterfacePrx workingMemory;
97  memoryx::LongtermMemoryInterfacePrx longtermMemory;
98  };
99 
100  Proxies proxies;
101 
102  memoryx::GridFileManagerPtr gridFileManager;
103  };
104 } // namespace memoryx
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:167
memoryx::ArmarXObjectsImporter::onConnectComponent
void onConnectComponent() override
Definition: ArmarXObjectsImporter.cpp:87
Component.h
armarx::Component
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition: Component.h:91
memoryx::GridFileManagerPtr
std::shared_ptr< GridFileManager > GridFileManagerPtr
Definition: AbstractEntityWrapper.h:33
memoryx::ArmarXObjectsImporter
Brief description of class ArmarXObjectsImporter.
Definition: ArmarXObjectsImporter.h:47
IceUtil::Handle< class PropertyDefinitionContainer >
memoryx::ArmarXObjectsImporter::onExitComponent
void onExitComponent() override
Definition: ArmarXObjectsImporter.cpp:172
memoryx::ArmarXObjectsImporter::getDefaultName
std::string getDefaultName() const override
Definition: ArmarXObjectsImporter.cpp:177
memoryx::ArmarXObjectsImporter::onInitComponent
void onInitComponent() override
Definition: ArmarXObjectsImporter.cpp:82