AbstractLongtermMemory.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::LongtermMemory
17* @author Alexey Kozlov ( kozlov at kit dot edu)
18* @date 2012
19* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20* GNU General Public License
21*/
22
23#pragma once
24
27
30#include <MemoryX/interface/components/CommonStorageInterface.h>
31#include <MemoryX/interface/components/LongtermMemoryInterface.h>
32
33namespace memoryx
34{
35
45
47 virtual public LongtermMemoryInterface,
48 virtual public SegmentedMemory,
49 virtual public armarx::Component
50 {
51 public:
52 // inherited from Component
53 std::string
54 getDefaultName() const override
55 {
56 return "AbstractLongtermMemory";
57 }
58
59 void onInitComponent() override;
60 void onConnectComponent() override;
61
62 void clear(const ::Ice::Current& = Ice::emptyCurrent) override;
63
65 getObjectAdapter() const override
66 {
67 return Component::getObjectAdapter();
68 }
69
70 /**
71 * @see PropertyUser::createPropertyDefinitions()
72 */
79
80 protected:
81 CommonStorageInterfacePrx storagePrx;
84
85 std::string dbName;
86
87 // subclass hooks
88 virtual void onInitLongtermMemory() = 0;
89 virtual void onConnectLongtermMemory() = 0;
90 };
91
93} // namespace memoryx
#define ARMARXCOMPONENT_IMPORT_EXPORT
Default component property definition container.
Definition Component.h:70
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Definition Component.cpp:46
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition Component.cpp:90
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineRequiredProperty(const std::string &name, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
virtual void onConnectLongtermMemory()=0
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Ice::ObjectAdapterPtr getObjectAdapter() const override
CommonStorageInterfacePrx storagePrx
virtual void onInitLongtermMemory()=0
std::string getDefaultName() const override
Retrieve default name of component.
::IceInternal::Handle<::Ice::Communicator > CommunicatorPtr
Definition IceManager.h:49
::IceInternal::Handle<::Ice::ObjectAdapter > ObjectAdapterPtr
Definition IceManager.h:52
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
VirtualRobot headers.
IceUtil::Handle< AbstractLongtermMemory > AbstractLongtermMemoryPtr
IceUtil::Handle< MongoSerializer > MongoSerializerPtr
Definition EntityRef.h:41