NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
regex-backref-manager.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
24
#ifndef NDN_UTIL_REGEX_BACKREF_MANAGER_HPP
25
#define NDN_UTIL_REGEX_BACKREF_MANAGER_HPP
26
27
#include "../../common.hpp"
28
29
#include <vector>
30
31
namespace
ndn
{
32
33
class
RegexMatcher;
34
35
class
RegexBackrefManager
36
{
37
public
:
38
RegexBackrefManager
()
39
{
40
}
41
42
virtual
43
~RegexBackrefManager
();
44
45
size_t
46
pushRef
(
const
shared_ptr<RegexMatcher>& matcher);
47
48
void
49
popRef
();
50
51
size_t
52
size
();
53
54
const
shared_ptr<RegexMatcher>&
55
getBackref
(
size_t
backrefNo);
56
57
private
:
58
std::vector<shared_ptr<RegexMatcher> > m_backrefs;
59
};
60
61
62
inline
63
RegexBackrefManager::~RegexBackrefManager
()
64
{
65
m_backrefs.clear();
66
}
67
68
inline
size_t
69
RegexBackrefManager::pushRef
(
const
shared_ptr<RegexMatcher>& matcher)
70
{
71
size_t
last = m_backrefs.size();
72
m_backrefs.push_back(matcher);
73
74
return
last;
75
}
76
77
inline
void
78
RegexBackrefManager::popRef
()
79
{
80
m_backrefs.pop_back();
81
}
82
83
inline
size_t
84
RegexBackrefManager::size
()
85
{
86
return
m_backrefs.size();
87
}
88
89
inline
const
shared_ptr<RegexMatcher>&
90
RegexBackrefManager::getBackref
(
size_t
backrefNo)
91
{
92
return
m_backrefs[backrefNo];
93
}
94
95
96
}
// namespace ndn
97
98
#endif // NDN_UTIL_REGEX_BACKREF_MANAGER_HPP
ndn::RegexBackrefManager::size
size_t size()
Definition:
regex-backref-manager.hpp:84
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::RegexBackrefManager::~RegexBackrefManager
virtual ~RegexBackrefManager()
Definition:
regex-backref-manager.hpp:63
ndn::RegexBackrefManager::popRef
void popRef()
Definition:
regex-backref-manager.hpp:78
ndn::RegexBackrefManager::pushRef
size_t pushRef(const shared_ptr< RegexMatcher > &matcher)
Definition:
regex-backref-manager.hpp:69
ndn::RegexBackrefManager::RegexBackrefManager
RegexBackrefManager()
Definition:
regex-backref-manager.hpp:38
ndn::RegexBackrefManager
Definition:
regex-backref-manager.hpp:35
ndn::RegexBackrefManager::getBackref
const shared_ptr< RegexMatcher > & getBackref(size_t backrefNo)
Definition:
regex-backref-manager.hpp:90
ndnSIM
ndn-cxx
src
util
regex
regex-backref-manager.hpp
Generated on Tue Feb 23 2016 22:18:44 for ndnSIM by
1.8.11