26 #include <boost/algorithm/string.hpp> 35 for (
auto& group : m_groups) {
36 if (group.empty() || group.find(
'/') != std::string::npos) {
38 <<
" in qualified name : \"" << m_qualified_name.append(group).append(
"/") <<
"\"";
40 m_qualified_name.append(group).append(
"/");
42 if (m_dataset_name.empty() || m_dataset_name.find(
'/') != std::string::npos) {
43 throw Elements::Exception() <<
"Invalid name : \"" << m_qualified_name.append(m_dataset_name) <<
"\"";
45 m_qualified_name.append(m_dataset_name);
50 boost::split(groups, qualified_name, boost::is_any_of(
"/"));
58 boost::split(groups, qualified_name, boost::is_any_of(
"/"));
96 size_t thisHash = this->
hash();
97 size_t otherHash = other.
hash();
98 if (thisHash != otherHash) {
99 return thisHash < otherHash;
106 size_t thisHash = this->
hash();
107 size_t otherHash = other.
hash();
108 if (thisHash != otherHash) {
116 return !(*
this == other);
bool operator!=(const QualifiedName &other) const
Checks if this QualifiedName is not equal with the parameter.
std::ostream & operator<<(std::ostream &stream, const QualifiedName &qualified_name)
Make the QualifiedName streamable.
std::string m_qualified_name
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 > m_groups
std::string m_dataset_name
const std::string & qualifiedName() const
Returns the qualified name as a string.
bool belongsInGroup(const QualifiedName &group) const
Checks if the QualifiedName belongs in a given group.
bool operator==(const QualifiedName &other) const
Checks if this QualifiedName is equal with the parameter.
bool operator<(const QualifiedName &other) const
Compares this QualifiedName with the parameter.
size_t hash() const
Returns the hash value of the QualifiedName.
const std::vector< std::string > & groups() const
Returns the groups qualifying the name.
Represents a name qualified with a set of groups.
const std::string & datasetName() const
Returns the unqualified name.
std::vector< std::string > getGroups(const std::string &qualified_name)