regex-pseudo-matcher.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
24 #ifndef NDN_UTIL_REGEX_REGEX_PSEUDO_MATCHER_HPP
25 #define NDN_UTIL_REGEX_REGEX_PSEUDO_MATCHER_HPP
26 
27 #include "../../common.hpp"
28 #include "regex-matcher.hpp"
29 
30 namespace ndn {
31 
33 {
34 public:
36 
37  virtual
39  {
40  }
41 
42  virtual void
44  {
45  }
46 
47  void
48  setMatchResult(const std::string& str);
49 
50  void
52 };
53 
54 inline
57 {
58 }
59 
60 inline void
61 RegexPseudoMatcher::setMatchResult(const std::string& str)
62 {
63  m_matchResult.push_back(name::Component(reinterpret_cast<const uint8_t*>(str.c_str()),
64  str.size()));
65 }
66 
67 inline void
69 {
70  m_matchResult.clear();
71 }
72 
73 
74 } // namespace ndn
75 
76 #endif // NDN_UTIL_REGEX_REGEX_PSEUDO_MATCHER_HPP
Copyright (c) 2013-2017 Regents of the University of California.
Definition: common.hpp:66
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.