All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
regex-pseudo-matcher.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
8 #ifndef NDN_UTIL_REGEX_REGEX_PSEUDO_MATCHER_HPP
9 #define NDN_UTIL_REGEX_REGEX_PSEUDO_MATCHER_HPP
10 
11 #include "../../common.hpp"
12 #include "regex-matcher.hpp"
13 
14 namespace ndn {
15 
17 {
18 public:
20 
22  {
23  }
24 
25  virtual void
27  {
28  }
29 
30  void
31  setMatchResult(const std::string& str);
32 
33  void
35 };
36 
38  :RegexMatcher ("", EXPR_PSEUDO)
39 {
40 }
41 
42 inline void
43 RegexPseudoMatcher::setMatchResult(const std::string& str)
44 {
45  m_matchResult.push_back(Name::Component((const uint8_t *)str.c_str(), str.size()));
46 }
47 
48 inline void
50 {
51  m_matchResult.clear();
52 }
53 
54 
55 } // namespace ndn
56 
57 #endif // NDN_UTIL_REGEX_REGEX_PSEUDO_MATCHER_HPP
virtual void compile()
Compile the regular expression to generate the more matchers when necessary.
std::vector< name::Component > m_matchResult
void setMatchResult(const std::string &str)
Component holds a read-only name component value.