NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
face-query-filter.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_MGMT_NFD_FACE_QUERY_FILTER_HPP
23
#define NDN_MGMT_NFD_FACE_QUERY_FILTER_HPP
24
25
#include "../../encoding/block.hpp"
26
#include "../../encoding/nfd-constants.hpp"
27
28
namespace
ndn
{
29
namespace
nfd
{
30
36
class
FaceQueryFilter
37
{
38
public
:
39
class
Error
:
public
tlv::Error
40
{
41
public
:
42
explicit
43
Error
(
const
std::string& what)
44
: tlv::
Error
(what)
45
{
46
}
47
};
48
49
FaceQueryFilter
();
50
51
explicit
52
FaceQueryFilter
(
const
Block
& block);
53
56
template
<encoding::Tag TAG>
57
size_t
58
wireEncode
(
EncodingImpl<TAG>
& encoder)
const
;
59
62
const
Block
&
63
wireEncode
()
const
;
64
67
void
68
wireDecode
(
const
Block
& wire);
69
70
public
:
// getters & setters
71
72
bool
73
hasFaceId
()
const
74
{
75
return
m_hasFaceId;
76
}
77
78
uint64_t
79
getFaceId
()
const
80
{
81
BOOST_ASSERT(this->
hasFaceId
());
82
return
m_faceId;
83
}
84
85
FaceQueryFilter
&
86
setFaceId
(uint64_t faceId);
87
88
FaceQueryFilter
&
89
unsetFaceId
();
90
91
bool
92
hasUriScheme
()
const
93
{
94
return
m_hasUriScheme;
95
}
96
97
const
std::string&
98
getUriScheme
()
const
99
{
100
BOOST_ASSERT(this->
hasUriScheme
());
101
return
m_uriScheme;
102
}
103
104
FaceQueryFilter
&
105
setUriScheme
(
const
std::string& uriScheme);
106
107
FaceQueryFilter
&
108
unsetUriScheme
();
109
110
bool
111
hasRemoteUri
()
const
112
{
113
return
m_hasRemoteUri;
114
}
115
116
const
std::string&
117
getRemoteUri
()
const
118
{
119
BOOST_ASSERT(this->
hasRemoteUri
());
120
return
m_remoteUri;
121
}
122
123
FaceQueryFilter
&
124
setRemoteUri
(
const
std::string& remoteUri);
125
126
FaceQueryFilter
&
127
unsetRemoteUri
();
128
129
bool
130
hasLocalUri
()
const
131
{
132
return
m_hasLocalUri;
133
}
134
135
const
std::string&
136
getLocalUri
()
const
137
{
138
BOOST_ASSERT(this->
hasLocalUri
());
139
return
m_localUri;
140
}
141
142
FaceQueryFilter
&
143
setLocalUri
(
const
std::string& localUri);
144
145
FaceQueryFilter
&
146
unsetLocalUri
();
147
148
bool
149
hasFaceScope
()
const
150
{
151
return
m_hasFaceScope;
152
}
153
154
FaceScope
155
getFaceScope
()
const
156
{
157
BOOST_ASSERT(this->
hasFaceScope
());
158
return
m_faceScope;
159
}
160
161
FaceQueryFilter
&
162
setFaceScope
(
FaceScope
faceScope);
163
164
FaceQueryFilter
&
165
unsetFaceScope
();
166
167
bool
168
hasFacePersistency
()
const
169
{
170
return
m_hasFacePersistency;
171
}
172
173
FacePersistency
174
getFacePersistency
()
const
175
{
176
BOOST_ASSERT(this->
hasFacePersistency
());
177
return
m_facePersistency;
178
}
179
180
FaceQueryFilter
&
181
setFacePersistency
(
FacePersistency
facePersistency);
182
183
FaceQueryFilter
&
184
unsetFacePersistency
();
185
186
bool
187
hasLinkType
()
const
188
{
189
return
m_hasLinkType;
190
}
191
192
LinkType
193
getLinkType
()
const
194
{
195
BOOST_ASSERT(this->
hasLinkType
());
196
return
m_linkType;
197
}
198
199
FaceQueryFilter
&
200
setLinkType
(
LinkType
linkType);
201
202
FaceQueryFilter
&
203
unsetLinkType
();
204
205
private
:
206
uint64_t m_faceId;
207
std::string m_uriScheme;
208
std::string m_remoteUri;
209
std::string m_localUri;
210
FaceScope
m_faceScope;
211
FacePersistency
m_facePersistency;
212
LinkType
m_linkType;
213
214
bool
m_hasFaceId;
215
bool
m_hasUriScheme;
216
bool
m_hasRemoteUri;
217
bool
m_hasLocalUri;
218
bool
m_hasFaceScope;
219
bool
m_hasFacePersistency;
220
bool
m_hasLinkType;
221
222
mutable
Block
m_wire;
223
};
224
225
std::ostream&
226
operator<<
(std::ostream& os,
const
FaceQueryFilter
& filter);
227
228
}
// namespace nfd
229
}
// namespace ndn
230
231
#endif // NDN_MGMT_NFD_FACE_QUERY_FILTER_HPP
ndn::nfd::FaceQueryFilter::getLinkType
LinkType getLinkType() const
Definition:
face-query-filter.hpp:193
ndn::nfd::FaceQueryFilter::hasFaceScope
bool hasFaceScope() const
Definition:
face-query-filter.hpp:149
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::nfd::LinkType
LinkType
Definition:
nfd-constants.hpp:75
ndn::nfd::FaceQueryFilter::unsetLocalUri
FaceQueryFilter & unsetLocalUri()
Definition:
face-query-filter.cpp:258
ndn::nfd::FaceQueryFilter::getLocalUri
const std::string & getLocalUri() const
Definition:
face-query-filter.hpp:136
ndn::nfd::FaceQueryFilter::hasFaceId
bool hasFaceId() const
Definition:
face-query-filter.hpp:73
ndn::nfd::FaceQueryFilter::getFaceScope
FaceScope getFaceScope() const
Definition:
face-query-filter.hpp:155
ndn::Block
Class representing a wire element of NDN-TLV packet format.
Definition:
block.hpp:43
ndn::nfd::FaceQueryFilter::getRemoteUri
const std::string & getRemoteUri() const
Definition:
face-query-filter.hpp:117
ndn::nfd::FaceQueryFilter::hasRemoteUri
bool hasRemoteUri() const
Definition:
face-query-filter.hpp:111
ndn::nfd::FaceQueryFilter::Error
Definition:
face-query-filter.hpp:39
ndn::nfd::FaceQueryFilter::unsetFaceScope
FaceQueryFilter & unsetFaceScope()
Definition:
face-query-filter.cpp:275
ndn::nfd::FaceQueryFilter::FaceQueryFilter
FaceQueryFilter()
Definition:
face-query-filter.cpp:36
ndn::nfd::FacePersistency
FacePersistency
Definition:
nfd-constants.hpp:49
ndn::nfd::FaceScope
FaceScope
Definition:
nfd-constants.hpp:34
ndn::nfd::FaceQueryFilter::setLocalUri
FaceQueryFilter & setLocalUri(const std::string &localUri)
Definition:
face-query-filter.cpp:249
ndn::nfd::FaceQueryFilter::hasUriScheme
bool hasUriScheme() const
Definition:
face-query-filter.hpp:92
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
ndn::nfd::FaceQueryFilter::getFaceId
uint64_t getFaceId() const
Definition:
face-query-filter.hpp:79
ndn::nfd::FaceQueryFilter::wireEncode
const Block & wireEncode() const
encode FaceQueryFilter
Definition:
face-query-filter.cpp:105
ndn::nfd::FaceQueryFilter::hasLinkType
bool hasLinkType() const
Definition:
face-query-filter.hpp:187
ndn::nfd::FaceQueryFilter::setFaceScope
FaceQueryFilter & setFaceScope(FaceScope faceScope)
Definition:
face-query-filter.cpp:266
ndn::nfd::FaceQueryFilter::unsetFaceId
FaceQueryFilter & unsetFaceId()
Definition:
face-query-filter.cpp:207
ndn::nfd::operator<<
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
Definition:
nfd-constants.cpp:30
ndn::nfd::FaceQueryFilter::setUriScheme
FaceQueryFilter & setUriScheme(const std::string &uriScheme)
Definition:
face-query-filter.cpp:215
ndn::encoding::EncodingImpl
Definition:
encoding-buffer-fwd.hpp:45
ndn::nfd::FaceQueryFilter::hasLocalUri
bool hasLocalUri() const
Definition:
face-query-filter.hpp:130
ndn::nfd::FaceQueryFilter::unsetFacePersistency
FaceQueryFilter & unsetFacePersistency()
Definition:
face-query-filter.cpp:292
ndn::nfd::FaceQueryFilter
represents Face Query Filter
Definition:
face-query-filter.hpp:36
ndn::nfd::FaceQueryFilter::unsetUriScheme
FaceQueryFilter & unsetUriScheme()
Definition:
face-query-filter.cpp:224
ndn::nfd::FaceQueryFilter::unsetRemoteUri
FaceQueryFilter & unsetRemoteUri()
Definition:
face-query-filter.cpp:241
ndn::nfd::FaceQueryFilter::setRemoteUri
FaceQueryFilter & setRemoteUri(const std::string &remoteUri)
Definition:
face-query-filter.cpp:232
ndn::nfd::FaceQueryFilter::Error::Error
Error(const std::string &what)
Definition:
face-query-filter.hpp:43
ndn::nfd::FaceQueryFilter::setFaceId
FaceQueryFilter & setFaceId(uint64_t faceId)
Definition:
face-query-filter.cpp:198
ndn::nfd::FaceQueryFilter::getUriScheme
const std::string & getUriScheme() const
Definition:
face-query-filter.hpp:98
ndn::nfd::FaceQueryFilter::setLinkType
FaceQueryFilter & setLinkType(LinkType linkType)
Definition:
face-query-filter.cpp:300
ndn::nfd::FaceQueryFilter::setFacePersistency
FaceQueryFilter & setFacePersistency(FacePersistency facePersistency)
Definition:
face-query-filter.cpp:283
ndn::nfd::FaceQueryFilter::getFacePersistency
FacePersistency getFacePersistency() const
Definition:
face-query-filter.hpp:174
ndn::nfd::FaceQueryFilter::hasFacePersistency
bool hasFacePersistency() const
Definition:
face-query-filter.hpp:168
ndn::nfd::FaceQueryFilter::wireDecode
void wireDecode(const Block &wire)
decode FaceQueryFilter
Definition:
face-query-filter.cpp:121
ndn::tlv::Error
represents an error in TLV encoding or decoding
Definition:
tlv.hpp:50
ndn::nfd::FaceQueryFilter::unsetLinkType
FaceQueryFilter & unsetLinkType()
Definition:
face-query-filter.cpp:309
ndnSIM
ndn-cxx
src
mgmt
nfd
face-query-filter.hpp
Generated on Wed Jan 11 2017 18:17:14 for ndnSIM by
1.8.13