All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
config-name-relation.hpp
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
23 #ifndef NDN_CONFIG_NAME_RELATION_HPP
24 #define NDN_CONFIG_NAME_RELATION_HPP
25 
26 #include "../../../name.hpp"
27 
28 namespace ndn {
29 
34 public:
35  enum Relation {
36  EQUAL,
37  IS_PREFIX_OF,
38  IS_STRICT_PREFIX_OF
39  };
40 
46  static std::string
47  toString(Relation relation);
48 
56  static bool
57  checkNameRelation(Relation relation, const Name& name1, const Name& name2);
58 
63  static Relation
64  getNameRelationFromString(const std::string& relationString);
65 };
66 
67 }
68 
69 #endif
static bool checkNameRelation(Relation relation, const Name &name1, const Name &name2)
Check whether name1 and name2 satisfy the relation.
A Name holds an array of Name::Component and represents an NDN name.
Definition: name.hpp:40
static std::string toString(Relation relation)
Get a string representation of the Relation enum.
static Relation getNameRelationFromString(const std::string &relationString)
Convert relationString to a ConfigNameRelation::Relation enum.
ConfigNameRelation defines the ConfigNameRelation::Relation enum and static methods to work with name...
Definition: config-name-relation.hpp:33