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
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);
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);
#define ARMARXCOMPONENT_IMPORT_EXPORT
PersistentEntitySegment(CollectionInterfacePrx entityCollection, Ice::CommunicatorPtr ic, bool useMongoIds=true)
EntityBasePtr getEntityById(const ::std::string &entityId, const ::Ice::Current &=Ice::emptyCurrent) const override
EntityBasePtr getEntityByName(const ::std::string &name, const ::Ice::Current &=Ice::emptyCurrent) const override
ObjectInstanceList getWorldInstancesByClassList(const NameList &classList, const ::Ice::Current &c=Ice::emptyCurrent) const
PersistentWorldStateSegment(CollectionInterfacePrx entityCollection, Ice::CommunicatorPtr ic, bool useMongoIds=true)
ObjectInstanceBasePtr getWorldInstanceById(const ::std::string &id, const ::Ice::Current &=Ice::emptyCurrent) const
ObjectInstanceList getWorldInstancesByClass(const ::std::string &className, const ::Ice::Current &c=Ice::emptyCurrent) const
ObjectInstanceBasePtr getWorldInstanceByName(const ::std::string &name, const ::Ice::Current &=Ice::emptyCurrent) const
ScopedSharedLockPtr getReadLock(const Ice::Current &c) const
#define ARMARX_WARNING_S
The logging level for unexpected behaviour, but not a serious problem.
std::shared_ptr< ScopedSharedLock > ScopedSharedLockPtr
::IceInternal::Handle<::Ice::Communicator > CommunicatorPtr
IceInternal::Handle< PersistentWorldStateSegment > PersistentWorldStateSegmentPtr