Go to the documentation of this file.
25 #include <ArmarXCore/interface/core/Log.h>
36 #include <SimoxUtility/algorithm/string/string_tools.h>
38 #include <IceUtil/UUID.h>
41 #define PRIOR_SEGMENT_NAME_CLASSES "classes"
42 #define PRIOR_SEGMENT_NAME_RELATIONS "relations"
43 #define PRIOR_SEGMENT_NAME_GRAPH "graphs"
50 const std::string clsCollNamesStr = getProperty<std::string>(
"ClassCollections").getValue();
53 const std::string relCollNamesStr = getProperty<std::string>(
"RelationCollections").getValue();
56 const std::string graphCollNamesStr = getProperty<std::string>(
"GraphCollections").getValue();
67 dataBasePrx = getProxy<CommonStorageInterfacePrx>(
"CommonStorage");
119 const size_t found = collNS.find_first_of(
'.');
120 if (found == std::string::npos)
124 std::string postfix = collNS.substr(found + 1, std::string::npos);
130 throw armarx::NotImplementedYetException();
136 segmentPrx->clearReadCollections();
138 for (memoryx::NameList::const_iterator it = collNameList.begin(); it != collNameList.end(); ++it)
141 CollectionInterfacePrx readColl =
dataBasePrx->requestCollection(*it);
145 ARMARX_ERROR <<
" Could not find collection with name " << *it << std::endl;
149 segmentPrx->addReadCollection(readColl);
IceManagerPtr getIceManager() const
Returns the IceManager.
bool hasGraphSegment(const Ice::Current &c=Ice::emptyCurrent) const override
AbstractMemorySegmentPrx addGenericSegment(const std::string &segmentName, const Ice::Current &) override
NameList relationCollNames
AbstractMemorySegmentPrx addSegment(const std::string &segmentName, const AbstractMemorySegmentPtr &segment, const ::Ice::Current &=Ice::emptyCurrent) override
PersistentRelationSegmentBasePrx getRelationsSegment(const ::Ice::Current &=Ice::emptyCurrent) const override
#define PRIOR_SEGMENT_NAME_GRAPH
GraphMemorySegmentBasePrx getGraphSegment(const ::Ice::Current &c=Ice::emptyCurrent) const override
The persistent object class segment is a specialized segment of the SegmentedMemory.
CommonStorageInterfacePrx getCommonStorage(const ::Ice::Current &=Ice::emptyCurrent) const override
void onConnectComponent() override
Pure virtual hook for the subclass.
bool starts_with(const std::string &haystack, const std::string &needle)
bool isPriorCollection(const ::std::string &collNS, const ::Ice::Current &=Ice::emptyCurrent) override
bool hasSegment(const std::string &segmentName, const ::Ice::Current &=Ice::emptyCurrent) const override
PersistentObjectClassSegmentBasePrx getObjectClassesSegment(const ::Ice::Current &=Ice::emptyCurrent) const override
CommonStorageInterfacePrx dataBasePrx
void clear(const ::Ice::Current &=Ice::emptyCurrent) override
#define PRIOR_SEGMENT_NAME_RELATIONS
void setSegmentReadCollections(const PersistentEntitySegmentBasePtr &segmentPrx, const NameList &collNameList)
The Graph Memory Segment contains directed graphs. The graph consists of nodes with poses and edges b...
#define PRIOR_SEGMENT_NAME_CLASSES
The PersistentEntitySegment class is the base class for all memory segments containing memoryx::Entit...
std::string getName() const
Retrieve name of object.
void onInitComponent() override
Pure virtual hook for the subclass.
AbstractMemorySegmentPrx getSegment(const std::string &segmentName, const ::Ice::Current &=Ice::emptyCurrent) const override
Ice::CommunicatorPtr getCommunicator() const
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 getMemoryName(const Ice::Current &) const override
std::vector< std::string > split(const std::string &source, const std::string &splitBy, bool trimElements=false, bool removeEmptyElements=false)