AbstractLongtermMemory.cpp
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
// core
24
#include <
ArmarXCore/core/CoreObjectFactories.h
>
25
#include <ArmarXCore/interface/core/Log.h>
26
#include <
ArmarXCore/observers/ObserverObjectFactories.h
>
27
28
// memoryx interface
29
#include "
AbstractLongtermMemory.h
"
30
#include <
MemoryX/core/MemoryXCoreObjectFactories.h
>
31
#include <
MemoryX/core/memory/PersistentEntitySegment.h
>
32
#include <MemoryX/interface/core/EntityBase.h>
33
#include <MemoryX/interface/memorytypes/MemoryEntities.h>
34
#include <
MemoryX/libraries/memorytypes/MemoryXTypesObjectFactories.h
>
35
36
namespace
memoryx
37
{
38
void
39
AbstractLongtermMemory::onInitComponent
()
40
{
41
usingProxy
(
"CommonStorage"
);
42
onInitLongtermMemory
();
43
}
44
45
void
46
AbstractLongtermMemory::onConnectComponent
()
47
{
48
ARMARX_INFO
<<
"Starting MemoryX::LongtermMemory"
;
49
50
ic
=
getIceManager
()->getCommunicator();
51
52
53
storagePrx
= getProxy<CommonStorageInterfacePrx>(
"CommonStorage"
);
54
dbName
= getProperty<std::string>(
"DatabaseName"
).getValue();
55
56
onConnectLongtermMemory
();
57
}
58
59
void
60
AbstractLongtermMemory::clear
(const ::Ice::Current&)
61
{
62
ARMARX_ERROR
<<
"LongtermMemory::clear() not implemented yet!"
;
63
}
64
}
// namespace memoryx
armarx::ManagedIceObject::getIceManager
IceManagerPtr getIceManager() const
Returns the IceManager.
Definition:
ManagedIceObject.cpp:366
memoryx::AbstractLongtermMemory::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition:
AbstractLongtermMemory.cpp:39
memoryx::AbstractLongtermMemory::storagePrx
CommonStorageInterfacePrx storagePrx
Definition:
AbstractLongtermMemory.h:81
memoryx::AbstractLongtermMemory::dbName
std::string dbName
Definition:
AbstractLongtermMemory.h:85
PersistentEntitySegment.h
memoryx
VirtualRobot headers.
Definition:
CommonPlacesTester.cpp:48
AbstractLongtermMemory.h
ObserverObjectFactories.h
MemoryXCoreObjectFactories.h
ARMARX_ERROR
#define ARMARX_ERROR
Definition:
Logging.h:196
memoryx::AbstractLongtermMemory::onConnectComponent
void onConnectComponent() override
Pure virtual hook for the subclass.
Definition:
AbstractLongtermMemory.cpp:46
memoryx::AbstractLongtermMemory::onInitLongtermMemory
virtual void onInitLongtermMemory()=0
CoreObjectFactories.h
ARMARX_INFO
#define ARMARX_INFO
Definition:
Logging.h:181
MemoryXTypesObjectFactories.h
memoryx::AbstractLongtermMemory::ic
Ice::CommunicatorPtr ic
Definition:
AbstractLongtermMemory.h:82
memoryx::AbstractLongtermMemory::onConnectLongtermMemory
virtual void onConnectLongtermMemory()=0
armarx::ManagedIceObject::usingProxy
bool usingProxy(const std::string &name, const std::string &endpoints="")
Registers a proxy for retrieval after initialization and adds it to the dependency list.
Definition:
ManagedIceObject.cpp:154
memoryx::AbstractLongtermMemory::clear
void clear(const ::Ice::Current &=Ice::emptyCurrent) override
Definition:
AbstractLongtermMemory.cpp:60
MemoryX
libraries
longtermmemory
AbstractLongtermMemory.cpp
Generated on Sat Mar 29 2025 09:17:24 for armarx_documentation by
1.8.17