27 #include <MemoryX/interface/core/EntityBase.h>
28 #include <MemoryX/interface/memorytypes/MemoryEntities.h>
29 #include <MemoryX/interface/memorytypes/MemorySegments.h>
37 virtual public ActiveOacMemorySegmentBase
41 OacMemorySegmentBasePrx oacSegmentPrx) :
43 ActiveOacMemorySegmentBase(),
44 objectInstanceSegmentPrx(objectInstanceSegmentPrx),
45 oacSegmentPrx(oacSegmentPrx)
50 addEntity(
const EntityBasePtr& entity, const ::Ice::Current&
c = Ice::emptyCurrent)
override
52 activeOac =
new ActiveOacFull;
55 WorkingMemoryListenerInterfacePrx tmpListenerProxy = listenerProxy;
58 listenerProxy = tmpListenerProxy;
60 ActiveOacPtr actualEntity = ActiveOacPtr::dynamicCast(getEntityById(
id));
61 activeOac->oac = oacSegmentPrx->getOacById(actualEntity->getOacRef()->entityId);
63 ObjectInstanceList args;
64 std::vector<std::string> ids = actualEntity->getArgumentInstanceIds();
66 for (std::vector<std::string>::const_iterator it = ids.begin(); it != ids.end(); ++it)
69 objectInstanceSegmentPrx->getObjectInstanceById(*it));
70 args.push_back(
object);
73 activeOac->parameters = args;
74 activeOac->entity = actualEntity;
78 listenerProxy->reportEntityCreated(segmentName, actualEntity);
91 changeState(OacExecState state, const ::Ice::Current& = Ice::emptyCurrent)
override
93 activeOac->entity->setState(state);
94 updateEntity(activeOac->entity->getId(), activeOac->entity);