Skip to content
Snippets Groups Projects
Commit d976f96e authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Add ObjectID.withInstanceName()

parent 0df5ba72
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,11 @@ namespace armarx ...@@ -57,6 +57,11 @@ namespace armarx
return _className == rhs._className && _dataset == rhs._dataset; return _className == rhs._className && _dataset == rhs._dataset;
} }
ObjectID ObjectID::withInstanceName(const std::string& instanceName) const
{
return ObjectID(_dataset, _className, instanceName);
}
bool ObjectID::operator==(const ObjectID& rhs) const bool ObjectID::operator==(const ObjectID& rhs) const
{ {
return _className == rhs._className return _className == rhs._className
......
...@@ -43,6 +43,8 @@ namespace armarx ...@@ -43,6 +43,8 @@ namespace armarx
/// Indicates whether dataset and class name are equal. /// Indicates whether dataset and class name are equal.
bool equalClass(const ObjectID& rhs) const; bool equalClass(const ObjectID& rhs) const;
ObjectID withInstanceName(const std::string& instanceName) const;
/// Indicates whether dataset, class name and instance name are equal. /// Indicates whether dataset, class name and instance name are equal.
bool operator==(const ObjectID& rhs) const; bool operator==(const ObjectID& rhs) const;
inline bool operator!=(const ObjectID& rhs) const inline bool operator!=(const ObjectID& rhs) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment