All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
ndn-regex-backref-manager.hpp
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
23 #ifndef NDN_NDN_REGEX_BACKREF_MANAGER_HPP
24 #define NDN_NDN_REGEX_BACKREF_MANAGER_HPP
25 
26 #include "ndn-regex-matcher-base.hpp"
27 
28 namespace ndn {
29 
31 public:
32  size_t
33  pushRef(const ptr_lib::shared_ptr<NdnRegexMatcherBase>& matcher)
34  {
35  size_t last = backrefs_.size();
36  backrefs_.push_back(matcher);
37 
38  return last;
39  }
40 
41  void
42  popRef() { backrefs_.pop_back(); }
43 
44  size_t
45  size() const { return backrefs_.size(); }
46 
47  ptr_lib::shared_ptr<NdnRegexMatcherBase>
48  getBackref(size_t i) const;
49 
50 private:
51  std::vector<ptr_lib::weak_ptr<NdnRegexMatcherBase>> backrefs_;
52 };
53 
54 }
55 
56 #endif
Definition: ndn-regex-backref-manager.hpp:30