27 #include <ArmarXCore/interface/core/Log.h>
29 #include <IceUtil/UUID.h>
32 #define COMMONSTORAGE_NAME "CommonStorage"
39 priorMemoryName = getProperty<std::string>(
"PriorMemoryName").getValue();
76 ARMARX_INFO <<
"Starting MemoryX::AbstractWorkingMemory";
108 longtermMemoryPrx->loadWorkingMemorySnapshot(getProperty<std::string>(
"SnapshotToLoad").getValue(), AbstractWorkingMemoryInterfacePrx::uncheckedCast(
getProxy()));
115 AbstractWorkingMemorySegmentPtr wmSegment = AbstractWorkingMemorySegmentPtr::dynamicCast(segment);
125 ARMARX_INFO <<
"Added AbstractWorkingMemorySegment: " << segmentName;
134 updaterImpl->setWorkingMemory(
this);
138 std::pair<std::string, MemoryUpdaterEntry> updaterEntry;
139 updaterEntry.first = updaterName;
140 updaterEntry.second.proxy = WorkingMemoryUpdaterBasePrx::uncheckedCast(updaterImpl->getProxy());
141 updaterEntry.second.pointer = updaterImpl;
146 ARMARX_INFO <<
"Registered AbstractWorkingMemoryUpdater: " << updaterName;
148 return updaterEntry.second.proxy;
156 MemoryUpdaterMap::iterator iter =
updaters.find(updaterName);
160 throw InvalidEntityException();
163 return iter->second.proxy;
170 MemoryUpdaterMap::iterator iter =
updaters.find(updaterName);
182 ARMARX_INFO <<
"Unregistered AbstractWorkingMemoryUpdater: " << updaterName;
190 for (MemorySegmentMap::iterator it =
segments.begin(); it !=
segments.end(); ++it)
192 it->second.pointer->clear();
200 std::cout <<
"Memory contains " <<
segments.size() <<
" segments" << std::endl;
202 for (MemorySegmentMap::const_iterator it =
segments.begin(); it !=
segments.end(); ++it)
204 std::cout <<
"Memory segment " << it->first <<
" contains " << it->second.pointer->size() <<
" entities" << std::endl;
205 it->second.pointer->print();