Yingdi Yu | 5e97420 | 2014-01-29 16:59:06 -0800 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2013 Regents of the University of California. |
| 4 | * @author: Yingdi Yu <yingdi@cs.ucla.edu> |
| 5 | * See COPYING for copyright and distribution information. |
| 6 | */ |
| 7 | |
| 8 | #ifndef NDN_REGEX_BACKREF_MANAGER_HPP |
| 9 | #define NDN_REGEX_BACKREF_MANAGER_HPP |
| 10 | |
| 11 | #include <vector> |
| 12 | #include "../../common.hpp" |
| 13 | |
| 14 | namespace ndn |
| 15 | { |
| 16 | |
| 17 | class RegexMatcher; |
| 18 | |
| 19 | class RegexBackrefManager |
| 20 | { |
| 21 | public: |
| 22 | RegexBackrefManager(){} |
| 23 | |
| 24 | virtual ~RegexBackrefManager(); |
| 25 | |
| 26 | int |
| 27 | pushRef(ptr_lib::shared_ptr<RegexMatcher> matcher); |
| 28 | |
| 29 | void |
| 30 | popRef(); |
| 31 | |
| 32 | int |
| 33 | size() |
| 34 | { return m_backRefs.size(); } |
| 35 | |
| 36 | ptr_lib::shared_ptr<RegexMatcher> |
| 37 | getBackRef(int i) |
| 38 | { return m_backRefs[i]; } |
| 39 | |
| 40 | private: |
| 41 | std::vector<ptr_lib::shared_ptr<RegexMatcher> > m_backRefs; |
| 42 | }; |
| 43 | |
| 44 | }//ndn |
| 45 | |
| 46 | #endif |