28 #include <MemoryX/interface/core/EntityBase.h>
29 #include <MemoryX/interface/memorytypes/MemoryEntities.h>
30 #include <MemoryX/interface/memorytypes/MemorySegments.h>
36 virtual public PersistentWorldStateSegmentBase
41 bool useMongoIds =
true) :
43 PersistentWorldStateSegmentBase()
49 const ::Ice::Current& = Ice::emptyCurrent)
const
51 ObjectInstanceBasePtr res = ObjectInstanceBasePtr::dynamicCast(getEntityById(
id));
55 ARMARX_WARNING_S <<
"Entity with id " <<
id <<
" is not of type ObjectInstance!"
64 const ::Ice::Current& = Ice::emptyCurrent)
const
66 ObjectInstanceBasePtr res = ObjectInstanceBasePtr::dynamicCast(getEntityByName(name));
70 ARMARX_WARNING_S <<
"Entity with name " << name <<
" is not of type ObjectInstance!"
79 const ::Ice::Current&
c = Ice::emptyCurrent)
const
82 classList.push_back(className);
83 return getWorldInstancesByClassList(classList,
c);
88 const ::Ice::Current&
c = Ice::emptyCurrent)
const
90 ObjectInstanceList result;
94 for (EntityMap::const_iterator it = entityMap.begin(); it != entityMap.end(); ++it)
96 ObjectInstanceBasePtr inst = ObjectInstanceBasePtr::dynamicCast(it->second);
97 ClassProbabilityMap instClasses = inst->getClasses();
99 for (NameList::const_iterator itCls = classList.begin(); itCls != classList.end();
102 if (instClasses.count(*itCls))
104 result.push_back(inst);