Go to the documentation of this file.
62 explicit MemoryID(
const std::string&
string);
195 std::string
str(
bool escapeDelimiters =
true)
const;
209 std::vector<std::string>
getAllItems(
bool escapeDelimiters =
false)
const;
211 std::vector<std::string>
getItems(
bool escapeDelimiters =
false)
const;
231 return not(*
this == other);
239 return rhs < (*this);
258 static long long parseInteger(
const std::string&
string,
const std::string& semanticName);
259 static std::string escapeDelimiter(
const std::string& name);
260 static std::string escape(
const std::string& name,
bool escapeDelimiters);
262 static const std::string delimiter;
266 std::string
str(
const std::string& delimiter,
bool escapeDelimiter)
const;
302 const std::string sid =
id.str();
303 return std::hash<string>()(sid);
bool isWellDefined() const
Indicate whether this ID is well-defined.
void setCoreSegmentID(const MemoryID &id)
MemoryID getEntityInstanceID() const
static Time timestampFromStr(const std::string ×tamp)
Reconstruct a timestamp from a string as returned by timestampStr().
bool operator>(const MemoryID &rhs) const
bool operator<=(const MemoryID &rhs) const
std::string providerSegmentName
MemoryID removeLeafItem() const
MemoryID withMemoryName(const std::string &name) const
bool operator!=(const MemoryID &other) const
std::string str(bool escapeDelimiters=true) const
Get a string representation of this memory ID.
bool contains(const MemoryID &general, const MemoryID &specific)
Indicates whether general is "less specific" than, or equal to, specific, i.e.
bool operator==(const MemoryID &other) const
std::string coreSegmentName
MemoryID withProviderSegmentName(const std::string &name) const
MemoryID withCoreSegmentName(const std::string &name) const
bool operator<(const MemoryID &rhs) const
MemoryID getEntitySnapshotID() const
void setProviderSegmentID(const MemoryID &id)
static MemoryID fromItems(const std::vector< std::string > &items)
Constructor memory ID from items as returned by getItems().
MemoryID()
Construct a default (empty) memory ID.
bool hasTimestamp() const
void setEntitySnapshotID(const MemoryID &id)
bool hasInstanceIndex() const
MemoryID getProviderSegmentID() const
bool hasGap() const
Indicate whether this ID has a gap such as in 'Memory//MyProvider' (no core segment name).
friend std::ostream & operator<<(std::ostream &os, const MemoryID id)
std::vector< std::string > getAllItems(bool escapeDelimiters=false) const
Get all levels as strings.
bool operator>=(const MemoryID &rhs) const
void setMemoryID(const MemoryID &id)
bool hasEntityName() const
static MemoryID fromString(const std::string &string)
Alias for constructor from string.
Represents a point in time.
MemoryID getCoreSegmentID() const
MemoryID getEntityID() const
void setEntityInstanceID(const MemoryID &id)
void clearInstanceIndex()
MemoryID withEntityName(const std::string &name) const
MemoryID getMemoryID() const
bool hasProviderSegmentName() const
bool hasCoreSegmentName() const
bool hasMemoryName() const
MemoryID withTimestamp(Time time) const
std::vector< std::string > getItems(bool escapeDelimiters=false) const
Get the levels from root to first not defined level (excluding).
MemoryID withInstanceIndex(int index) const
void setEntityID(const MemoryID &id)
std::size_t operator()(const armarx::armem::MemoryID &id) const
std::string getLeafItem() const
Get the lowest defined level (or empty string if there is none).
static DateTime Invalid()
std::string instanceIndexStr() const
Get the instance index as string.
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::string timestampStr() const
Get the timestamp as string.
static int instanceIndexFromStr(const std::string &index)
Reconstruct an instance index from a string as returned by instanceIndexStr().
const armem::MemoryID MemoryID