24 #include <boost/algorithm/string/predicate.hpp>
35 return os <<
"is-prefix-of";
37 return os <<
"is-strict-prefix-of";
47 return name1 == name2;
59 if (boost::iequals(relationString,
"equal")) {
62 else if (boost::iequals(relationString,
"is-prefix-of")) {
65 else if (boost::iequals(relationString,
"is-strict-prefix-of")) {
Represents an absolute name.
size_t size() const noexcept
Returns the number of components.
bool isPrefixOf(const Name &other) const noexcept
Check if this name is a prefix of another name.
NameRelation getNameRelationFromString(const std::string &relationString)
Convert relationString to NameRelation.
bool checkNameRelation(NameRelation relation, const Name &name1, const Name &name2)
Check whether name1 and name2 satisfies relation.
std::ostream & operator<<(std::ostream &os, NameRelation relation)