How to create a new persistent memory segment in MemoryX
  • Create Ice interface for new segment in MemoryX/interface/memorytypes/MemorySegments.ice which inherits from memoryx::PersistentEntitySegmentBase
    ["cpp:virtual"]
    class PersistentDataSegmentBase extends PersistentEntitySegmentBase
    {
    // add some special methods here
    };
  • Create C++ implementation file
    #include "PersistentDataSegment.h"
    using namespace memoryx;
    PersistentDataSegment::PersistentDataSegment(CollectionInterfacePrx entityCollection, Ice::CommunicatorPtr communicator, bool useMongoIds) :
    PersistentEntitySegment(entityCollection, communicator, useMongoIds),
    PersistentDataSegmentBase()
    {
    }
    // implementation of further methods
  • Add header and implementation files to the appropriate CMake target.
PersistentEntitySegment.h
memoryx
VirtualRobot headers.
Definition: CommonPlacesTester.cpp:48
IceInternal::Handle< ::Ice::Communicator >
ARMARXCOMPONENT_IMPORT_EXPORT
#define ARMARXCOMPONENT_IMPORT_EXPORT
Definition: ImportExportComponent.h:38
memoryx::PersistentProfilerDataSegmentPtr
IceInternal::Handle< PersistentProfilerDataSegment > PersistentProfilerDataSegmentPtr
Definition: PersistentProfilerDataSegment.h:68
memoryx::PersistentEntitySegment
The PersistentEntitySegment class is the base class for all memory segments containing memoryx::Entit...
Definition: PersistentEntitySegment.h:107
ImportExportComponent.h