23 #ifndef NDN_CONFIG_CHECKER_HPP
24 #define NDN_CONFIG_CHECKER_HPP
26 #include "../../../name.hpp"
27 #include "config-name-relation.hpp"
28 #include "../validation-state.hpp"
33 class NdnRegexTopMatcher;
60 (
bool isForInterest,
const Name& packetName,
const Name& keyLocatorName,
61 const ptr_lib::shared_ptr<ValidationState>& state);
69 static ptr_lib::shared_ptr<ConfigChecker>
88 (
const Name& packetName,
const Name& keyLocatorName,
89 const ptr_lib::shared_ptr<ValidationState>& state) = 0;
92 static ptr_lib::shared_ptr<ConfigChecker>
95 static ptr_lib::shared_ptr<ConfigChecker>
96 createHierarchicalChecker(
const BoostInfoTree& configSection);
98 static ptr_lib::shared_ptr<ConfigChecker>
101 static ptr_lib::shared_ptr<ConfigChecker>
102 createKeyLocatorNameChecker(
const BoostInfoTree& configSection);
112 (
const Name& name, ConfigNameRelation::Relation relation)
121 (
const Name& packetName,
const Name& keyLocatorName,
122 const ptr_lib::shared_ptr<ValidationState>& state);
126 ConfigNameRelation::Relation relation_;
136 (
const Name& packetName,
const Name& keyLocatorName,
137 const ptr_lib::shared_ptr<ValidationState>& state);
140 ptr_lib::shared_ptr<NdnRegexTopMatcher> regex_;
146 (
const std::string& packetNameRegexString,
const std::string& packetNameExpansion,
147 const std::string& keyNameRegexString,
const std::string& keyNameExpansion,
148 ConfigNameRelation::Relation hyperRelation);
153 (
const Name& packetName,
const Name& keyLocatorName,
154 const ptr_lib::shared_ptr<ValidationState>& state);
157 ptr_lib::shared_ptr<NdnRegexTopMatcher> packetNameRegex_;
158 std::string packetNameExpansion_;
159 ptr_lib::shared_ptr<NdnRegexTopMatcher> keyNameRegex_;
160 std::string keyNameExpansion_;
161 ConfigNameRelation::Relation hyperRelation_;
Definition: config-checker.hpp:109
virtual bool checkNames(const Name &packetName, const Name &keyLocatorName, const ptr_lib::shared_ptr< ValidationState > &state)
Check if the packet name ane KeyLocator name satisfy this checker's conditions.
virtual bool checkNames(const Name &packetName, const Name &keyLocatorName, const ptr_lib::shared_ptr< ValidationState > &state)=0
Check if the packet name ane KeyLocator name satisfy this checker's conditions.
virtual bool checkNames(const Name &packetName, const Name &keyLocatorName, const ptr_lib::shared_ptr< ValidationState > &state)
Check if the packet name ane KeyLocator name satisfy this checker's conditions.
BoostInfoTree is provided for compatibility with the Boost INFO property list format used in ndn-cxx...
Definition: boost-info-parser.hpp:46
static ptr_lib::shared_ptr< ConfigChecker > create(const BoostInfoTree &configSection)
Create a checker from the configuration section.
A ConfigChecker is an abstract base class for ConfigNameRelationChecker, etc.
Definition: config-checker.hpp:40
A Name holds an array of Name::Component and represents an NDN name.
Definition: name.hpp:40
Definition: config-checker.hpp:143
virtual bool checkNames(const Name &packetName, const Name &keyLocatorName, const ptr_lib::shared_ptr< ValidationState > &state)
Check if the packet name ane KeyLocator name satisfy this checker's conditions.
Definition: config-checker.hpp:129
bool check(bool isForInterest, const Name &packetName, const Name &keyLocatorName, const ptr_lib::shared_ptr< ValidationState > &state)
Check if the packet name ane KeyLocator name satisfy this checker's conditions.