29 #include <MemoryX/interface/core/EntityBase.h>
30 #include <MemoryX/interface/memorytypes/MemoryEntities.h>
31 #include <MemoryX/interface/memorytypes/MemorySegments.h>
37 virtual public PersistentWorldStateSegmentBase
46 ObjectInstanceBasePtr
getWorldInstanceById(const ::std::string&
id, const ::Ice::Current& = Ice::emptyCurrent)
const
48 ObjectInstanceBasePtr res = ObjectInstanceBasePtr::dynamicCast(getEntityById(
id));
52 ARMARX_WARNING_S <<
"Entity with id " <<
id <<
" is not of type ObjectInstance!" << std::endl;
58 ObjectInstanceBasePtr
getWorldInstanceByName(const ::std::string& name, const ::Ice::Current& = Ice::emptyCurrent)
const
60 ObjectInstanceBasePtr res = ObjectInstanceBasePtr::dynamicCast(getEntityByName(name));
64 ARMARX_WARNING_S <<
"Entity with name " << name <<
" is not of type ObjectInstance!" << std::endl;
73 classList.push_back(className);
74 return getWorldInstancesByClassList(classList,
c);
79 ObjectInstanceList result;
83 for (EntityMap::const_iterator it = entityMap.begin(); it != entityMap.end(); ++it)
85 ObjectInstanceBasePtr inst = ObjectInstanceBasePtr::dynamicCast(it->second);
86 ClassProbabilityMap instClasses = inst->getClasses();
88 for (NameList::const_iterator itCls = classList.begin(); itCls != classList.end(); ++itCls)
90 if (instClasses.count(*itCls))
92 result.push_back(inst);