NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ndnSIM
ndnSIM documentation
All Attributes
All GlobalValues
All LogComponents
All TraceSources
Todo List
Deprecated List
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
regex-top-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_TOP_MATCHER_HPP
25
#define NDN_UTIL_REGEX_REGEX_TOP_MATCHER_HPP
26
27
#include "../../common.hpp"
28
29
#include "
regex-matcher.hpp
"
30
31
namespace
ndn
{
32
33
class
RegexPatternListMatcher;
34
class
RegexBackrefManager;
35
36
class
RegexTopMatcher
:
public
RegexMatcher
37
{
38
public
:
39
RegexTopMatcher
(
const
std::string& expr,
const
std::string&
expand
=
""
);
40
41
virtual
42
~RegexTopMatcher
();
43
44
bool
45
match
(
const
Name
&
name
);
46
47
virtual
bool
48
match
(
const
Name
& name,
size_t
offset,
size_t
len);
49
50
virtual
Name
51
expand
(
const
std::string&
expand
=
""
);
52
53
static
shared_ptr<RegexTopMatcher>
54
fromName
(
const
Name
& name,
bool
hasAnchor=
false
);
55
56
protected
:
57
virtual
void
58
compile
();
59
60
private
:
61
std::string
62
getItemFromExpand(
const
std::string& expand,
size_t
& offset);
63
64
static
std::string
65
convertSpecialChar(
const
std::string& str);
66
67
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
:
68
const
std::string m_expand;
69
shared_ptr<RegexPatternListMatcher> m_primaryMatcher;
70
shared_ptr<RegexPatternListMatcher> m_secondaryMatcher;
71
shared_ptr<RegexBackrefManager> m_primaryBackrefManager;
72
shared_ptr<RegexBackrefManager> m_secondaryBackrefManager;
73
bool
m_isSecondaryUsed;
74
};
75
76
}
// namespace ndn
77
78
#endif // NDN_UTIL_REGEX_REGEX_TOP_MATCHER_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::RegexTopMatcher::fromName
static shared_ptr< RegexTopMatcher > fromName(const Name &name, bool hasAnchor=false)
Definition:
regex-top-matcher.cpp:201
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
Definition:
common.hpp:43
ndn::RegexTopMatcher
Definition:
regex-top-matcher.hpp:36
ndn::RegexTopMatcher::compile
virtual void compile()
Compile the regular expression to generate the more matchers when necessary.
Definition:
regex-top-matcher.cpp:48
regex-matcher.hpp
ndn::Name
Represents an absolute name.
Definition:
name.hpp:42
ndn::RegexTopMatcher::expand
virtual Name expand(const std::string &expand="")
Definition:
regex-top-matcher.cpp:105
ndn::RegexTopMatcher::match
bool match(const Name &name)
Definition:
regex-top-matcher.cpp:75
ndn::RegexTopMatcher::~RegexTopMatcher
virtual ~RegexTopMatcher()
Definition:
regex-top-matcher.cpp:43
ndn::RegexTopMatcher::RegexTopMatcher
RegexTopMatcher(const std::string &expr, const std::string &expand="")
Definition:
regex-top-matcher.cpp:33
ndn::name
Definition:
name-component.cpp:37
ndn::RegexMatcher
Definition:
regex-matcher.hpp:34
ndnSIM
ndn-cxx
src
util
regex
regex-top-matcher.hpp
Generated on Thu Nov 2 2017 03:30:29 for ndnSIM by
1.8.11