25#include <IceUtil/UUID.h>
27#include <SimoxUtility/algorithm/string/string_tools.h>
29#include <ArmarXCore/interface/core/Log.h>
40#define PRIOR_SEGMENT_NAME_CLASSES "classes"
41#define PRIOR_SEGMENT_NAME_RELATIONS "relations"
42#define PRIOR_SEGMENT_NAME_GRAPH "graphs"
54 const std::string relCollNamesStr =
58 const std::string graphCollNamesStr =
80 CollectionInterfacePrx writeRelationColl =
91 CollectionInterfacePrx graphClassColl =
99 PersistentObjectClassSegmentBasePrx
102 return PersistentObjectClassSegmentBasePrx::uncheckedCast(
106 PersistentRelationSegmentBasePrx
109 return PersistentRelationSegmentBasePrx::uncheckedCast(
113 GraphMemorySegmentBasePrx
125 CommonStorageInterfacePrx
134 const size_t found = collNS.find_first_of(
'.');
135 if (found == std::string::npos)
139 std::string postfix = collNS.substr(found + 1, std::string::npos);
140 return simox::alg::starts_with(postfix, PRIOR_COLLECTION_PREFIX);
146 throw armarx::NotImplementedYetException();
151 const NameList& collNameList)
154 segmentPrx->clearReadCollections();
156 for (memoryx::NameList::const_iterator it = collNameList.begin(); it != collNameList.end();
160 CollectionInterfacePrx readColl =
dataBasePrx->requestCollection(*it);
164 ARMARX_ERROR <<
" Could not find collection with name " << *it << std::endl;
168 segmentPrx->addReadCollection(readColl);
179 AbstractMemorySegmentPrx
#define PRIOR_SEGMENT_NAME_RELATIONS
#define PRIOR_SEGMENT_NAME_GRAPH
#define PRIOR_SEGMENT_NAME_CLASSES
Property< PropertyType > getProperty(const std::string &name)
bool usingProxy(const std::string &name, const std::string &endpoints="")
Registers a proxy for retrieval after initialization and adds it to the dependency list.
std::string getName() const
Retrieve name of object.
IceManagerPtr getIceManager() const
Returns the IceManager.
Ice::ObjectPrx getProxy(long timeoutMs=0, bool waitForScheduler=true) const
Returns the proxy of this object (optionally it waits for the proxy)
Ice::CommunicatorPtr getCommunicator() const
The Graph Memory Segment contains directed graphs.
The PersistentEntitySegment class is the base class for all memory segments containing memoryx::Entit...
The persistent object class segment is a specialized segment of the SegmentedMemory.
void onInitComponent() override
Pure virtual hook for the subclass.
CommonStorageInterfacePrx dataBasePrx
void clear(const ::Ice::Current &=Ice::emptyCurrent) override
AbstractMemorySegmentPrx addGenericSegment(const std::string &segmentName, const Ice::Current &) override
PersistentRelationSegmentBasePrx getRelationsSegment(const ::Ice::Current &=Ice::emptyCurrent) const override
NameList relationCollNames
GraphMemorySegmentBasePrx getGraphSegment(const ::Ice::Current &c=Ice::emptyCurrent) const override
CommonStorageInterfacePrx getCommonStorage(const ::Ice::Current &=Ice::emptyCurrent) const override
void setSegmentReadCollections(const PersistentEntitySegmentBasePtr &segmentPrx, const NameList &collNameList)
bool isPriorCollection(const ::std::string &collNS, const ::Ice::Current &=Ice::emptyCurrent) override
void onConnectComponent() override
Pure virtual hook for the subclass.
std::string getMemoryName(const Ice::Current &) const override
bool hasGraphSegment(const Ice::Current &c=Ice::emptyCurrent) const override
PersistentObjectClassSegmentBasePrx getObjectClassesSegment(const ::Ice::Current &=Ice::emptyCurrent) const override
AbstractMemorySegmentPrx addSegment(const std::string &segmentName, const AbstractMemorySegmentPtr &segment, const ::Ice::Current &=Ice::emptyCurrent) override
AbstractMemorySegmentPrx getSegment(const std::string &segmentName, const ::Ice::Current &=Ice::emptyCurrent) const override
bool hasSegment(const std::string &segmentName, const ::Ice::Current &=Ice::emptyCurrent) const override
#define ARMARX_INFO
The normal logging level.
#define ARMARX_ERROR
The logging level for unexpected behaviour, that must be fixed.
::IceInternal::Handle<::Ice::Communicator > CommunicatorPtr
IceUtil::Handle< PersistentEntitySegment > PersistentEntitySegmentPtr
IceInternal::Handle< PersistentObjectClassSegment > PersistentObjectClassSegmentPtr
IceInternal::Handle< PersistentRelationSegment > PersistentRelationSegmentPtr
IceInternal::Handle< GraphMemorySegment > GraphMemorySegmentPtr