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