28#include <boost/algorithm/string.hpp>
34 : m_groups{
std::move(groups_)}, m_dataset_name{
std::move(name)} {
36 if (group.empty() || group.find(
'/') != std::string::npos) {
50 boost::split(groups, qualified_name, boost::is_any_of(
"/"));
58 boost::split(groups, qualified_name, boost::is_any_of(
"/"));
94 size_t thisHash = this->
hash();
95 size_t otherHash = other.
hash();
96 if (thisHash != otherHash) {
97 return thisHash < otherHash;
104 size_t thisHash = this->
hash();
105 size_t otherHash = other.
hash();
106 if (thisHash != otherHash) {
114 return !(*
this == other);
Represents a name qualified with a set of groups.
std::string m_qualified_name
bool operator==(const QualifiedName &other) const
Checks if this QualifiedName is equal with the parameter.
size_t hash() const
Returns the hash value of the QualifiedName.
bool belongsInGroup(const QualifiedName &group) const
Checks if the QualifiedName belongs in a given group.
bool operator<(const QualifiedName &other) const
Compares this QualifiedName with the parameter.
std::string m_dataset_name
const std::string & qualifiedName() const
Returns the qualified name as a string.
const std::string & datasetName() const
Returns the unqualified name.
const std::vector< std::string > & groups() const
Returns the groups qualifying the name.
std::vector< std::string > m_groups
bool operator!=(const QualifiedName &other) const
Checks if this QualifiedName is not equal with the parameter.
QualifiedName(std::vector< std::string > groups, std::string name)
Constructs a QualifiedName with the given group and name.
std::string getName(const std::string &qualified_name)
std::vector< std::string > getGroups(const std::string &qualified_name)