NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
selectors.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_SELECTORS_HPP
23
#define NDN_SELECTORS_HPP
24
25
#include "
common.hpp
"
26
#include "
key-locator.hpp
"
27
#include "
exclude.hpp
"
28
29
namespace
ndn
{
30
34
class
Selectors
35
{
36
public
:
37
class
Error
:
public
tlv::Error
38
{
39
public
:
40
explicit
41
Error
(
const
std::string& what)
42
: tlv::
Error
(what)
43
{
44
}
45
};
46
47
Selectors
();
48
52
explicit
53
Selectors
(
const
Block
& wire);
54
55
bool
56
empty
()
const
;
57
61
template
<encoding::Tag TAG>
62
size_t
63
wireEncode
(
EncodingImpl<TAG>
& encoder)
const
;
64
68
const
Block
&
69
wireEncode
()
const
;
70
74
void
75
wireDecode
(
const
Block
& wire);
76
77
public
:
// getters & setters
78
int
79
getMinSuffixComponents
()
const
80
{
81
return
m_minSuffixComponents;
82
}
83
84
Selectors
&
85
setMinSuffixComponents
(
int
minSuffixComponents);
86
87
int
88
getMaxSuffixComponents
()
const
89
{
90
return
m_maxSuffixComponents;
91
}
92
93
Selectors
&
94
setMaxSuffixComponents
(
int
maxSuffixComponents);
95
96
const
KeyLocator
&
97
getPublisherPublicKeyLocator
()
const
98
{
99
return
m_publisherPublicKeyLocator;
100
}
101
102
Selectors
&
103
setPublisherPublicKeyLocator
(
const
KeyLocator
& keyLocator);
104
105
const
Exclude
&
106
getExclude
()
const
107
{
108
return
m_exclude;
109
}
110
111
Selectors
&
112
setExclude
(
const
Exclude
& exclude);
113
114
int
115
getChildSelector
()
const
116
{
117
return
m_childSelector;
118
}
119
120
Selectors
&
121
setChildSelector
(
int
childSelector);
122
123
int
124
getMustBeFresh
()
const
125
{
126
return
m_mustBeFresh;
127
}
128
129
Selectors
&
130
setMustBeFresh
(
bool
mustBeFresh);
131
132
public
:
// EqualityComparable concept
133
bool
134
operator==
(
const
Selectors
& other)
const
;
135
136
bool
137
operator!=
(
const
Selectors
& other)
const
138
{
139
return
!this->
operator==
(other);
140
}
141
142
private
:
143
int
m_minSuffixComponents;
144
int
m_maxSuffixComponents;
145
KeyLocator
m_publisherPublicKeyLocator;
146
Exclude
m_exclude;
147
int
m_childSelector;
148
bool
m_mustBeFresh;
149
150
mutable
Block
m_wire;
151
};
152
153
}
// namespace ndn
154
155
#endif // NDN_SELECTORS_HPP
ndn::Selectors::wireDecode
void wireDecode(const Block &wire)
Decode the input from wire format.
Definition:
selectors.cpp:135
ndn::Selectors::getMinSuffixComponents
int getMinSuffixComponents() const
Definition:
selectors.hpp:79
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::Selectors::Error
Definition:
selectors.hpp:37
ndn::Selectors::setMustBeFresh
Selectors & setMustBeFresh(bool mustBeFresh)
Definition:
selectors.cpp:223
ndn::Selectors::empty
bool empty() const
Definition:
selectors.cpp:49
exclude.hpp
ndn::Selectors::getMustBeFresh
int getMustBeFresh() const
Definition:
selectors.hpp:124
ndn::Block
Class representing a wire element of NDN-TLV packet format.
Definition:
block.hpp:43
common.hpp
Copyright (c) 2013-2016 Regents of the University of California.
ndn::Selectors::getChildSelector
int getChildSelector() const
Definition:
selectors.hpp:115
ndn::Selectors::setMaxSuffixComponents
Selectors & setMaxSuffixComponents(int maxSuffixComponents)
Definition:
selectors.cpp:191
ndn::Selectors::setExclude
Selectors & setExclude(const Exclude &exclude)
Definition:
selectors.cpp:207
ndn::Selectors::setChildSelector
Selectors & setChildSelector(int childSelector)
Definition:
selectors.cpp:215
ndn::Selectors::Error::Error
Error(const std::string &what)
Definition:
selectors.hpp:41
ndn::Selectors::setMinSuffixComponents
Selectors & setMinSuffixComponents(int minSuffixComponents)
Definition:
selectors.cpp:183
ndn::Selectors::getPublisherPublicKeyLocator
const KeyLocator & getPublisherPublicKeyLocator() const
Definition:
selectors.hpp:97
ndn::Selectors::operator!=
bool operator!=(const Selectors &other) const
Definition:
selectors.hpp:137
ndn::Selectors::wireEncode
const Block & wireEncode() const
Encode to a wire format.
Definition:
selectors.cpp:119
ndn::Selectors
Abstraction implementing Interest selectors.
Definition:
selectors.hpp:34
ndn::encoding::EncodingImpl
Definition:
encoding-buffer-fwd.hpp:45
ndn::Selectors::operator==
bool operator==(const Selectors &other) const
Definition:
selectors.cpp:231
ndn::Selectors::getMaxSuffixComponents
int getMaxSuffixComponents() const
Definition:
selectors.hpp:88
ndn::KeyLocator
Definition:
key-locator.hpp:30
ndn::Selectors::getExclude
const Exclude & getExclude() const
Definition:
selectors.hpp:106
ndn::Selectors::Selectors
Selectors()
Definition:
selectors.cpp:35
key-locator.hpp
ndn::tlv::Error
represents an error in TLV encoding or decoding
Definition:
tlv.hpp:50
ndn::Exclude
Represents Exclude selector in NDN Interest.
Definition:
exclude.hpp:38
ndn::Selectors::setPublisherPublicKeyLocator
Selectors & setPublisherPublicKeyLocator(const KeyLocator &keyLocator)
Definition:
selectors.cpp:199
ndnSIM
ndn-cxx
src
selectors.hpp
Generated on Wed Jan 11 2017 18:17:14 for ndnSIM by
1.8.13