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")) {
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.
std::ostream & operator<<(std::ostream &os, NameRelation relation)
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.