30 BOOST_CONCEPT_ASSERT((boost::EqualityComparable<FaceQueryFilter>));
31 BOOST_CONCEPT_ASSERT((WireEncodable<FaceQueryFilter>));
32 BOOST_CONCEPT_ASSERT((WireDecodable<FaceQueryFilter>));
33 static_assert(std::is_base_of<tlv::Error, FaceQueryFilter::Error>::value,
34 "FaceQueryFilter::Error must inherit from tlv::Error");
43 template<encoding::Tag TAG>
47 size_t totalLength = 0;
54 if (m_facePersistency) {
81 totalLength += encoder.prependVarNumber(totalLength);
100 m_wire = buffer.block();
109 BOOST_THROW_EXCEPTION(
Error(
"expecting FaceQueryFilter block"));
149 m_faceScope = readNonNegativeIntegerAs<FaceScope>(*val);
157 m_facePersistency = readNonNegativeIntegerAs<FacePersistency>(*val);
165 m_linkType = readNonNegativeIntegerAs<LinkType>(*val);
205 m_uriScheme = uriScheme;
219 m_remoteUri = remoteUri;
233 m_localUri = localUri;
247 m_faceScope = faceScope;
263 m_facePersistency = facePersistency;
279 m_linkType = linkType;
313 os <<
"FaceQueryFilter(";
315 os <<
"FaceID: " << filter.
getFaceId() <<
",\n";
327 os <<
"LocalUri: " << filter.
getLocalUri() <<
",\n";
339 os <<
"LinkType: " << filter.
getLinkType() <<
",\n";
const std::string & getUriScheme() const
constexpr nullopt_t nullopt
Copyright (c) 2013-2017 Regents of the University of California.
FaceQueryFilter & unsetLocalUri()
size_t prependNonNegativeIntegerBlock(EncodingImpl< TAG > &encoder, uint32_t type, uint64_t value)
Prepend a TLV element containing a non-negative integer.
element_container::const_iterator element_const_iterator
Represents a TLV element of NDN packet format.
size_t prependStringBlock(EncodingImpl< TAG > &encoder, uint32_t type, const std::string &value)
Prepend a TLV element containing a string.
std::string readString(const Block &block)
Read TLV-VALUE of a TLV element as a string.
uint64_t readNonNegativeInteger(const Block &block)
Read a non-negative integer from a TLV element.
LinkType getLinkType() const
FaceQueryFilter & unsetFaceScope()
bool hasUriScheme() const
FaceQueryFilter & setLocalUri(const std::string &localUri)
uint64_t getFaceId() const
bool hasFaceScope() const
const std::string & getLocalUri() const
FacePersistency getFacePersistency() const
bool operator==(const ChannelStatus &a, const ChannelStatus &b)
FaceQueryFilter & setFaceScope(FaceScope faceScope)
FaceQueryFilter & unsetFaceId()
#define NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(ClassName)
bool hasRemoteUri() const
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
void reset()
Reset wire buffer of the element.
FaceQueryFilter & setUriScheme(const std::string &uriScheme)
const Block & wireEncode() const
encode FaceQueryFilter
FaceQueryFilter & unsetFacePersistency()
represents Face Query Filter
FaceQueryFilter & unsetUriScheme()
void parse() const
Parse TLV-VALUE into sub elements.
uint32_t type() const
Get TLV-TYPE.
const std::string & getRemoteUri() const
FaceQueryFilter & unsetRemoteUri()
FaceQueryFilter & setRemoteUri(const std::string &remoteUri)
FaceQueryFilter & setFaceId(uint64_t faceId)
bool hasWire() const
Check if the Block has fully encoded wire.
element_const_iterator elements_end() const
Equivalent to elements().end()
FaceQueryFilter & setLinkType(LinkType linkType)
FaceQueryFilter & setFacePersistency(FacePersistency facePersistency)
element_const_iterator elements_begin() const
Equivalent to elements().begin()
void wireDecode(const Block &wire)
decode FaceQueryFilter
EncodingImpl< EncoderTag > EncodingBuffer
bool hasFacePersistency() const
EncodingImpl< EstimatorTag > EncodingEstimator
FaceScope getFaceScope() const
FaceQueryFilter & unsetLinkType()