34 return os <<
"NoCache";
50 template<encoding::Tag TAG>
60 length += encoder.prependVarNumber(length);
84 m_wire = buffer.block();
105 m_policy = readNonNegativeIntegerAs<CachePolicyType>(*it);
Represents a TLV element of the NDN packet format.
element_const_iterator elements_begin() const noexcept
Equivalent to elements().begin().
element_const_iterator elements_end() const noexcept
Equivalent to elements().end().
bool hasWire() const noexcept
Check if the Block contains a fully encoded wire representation.
uint32_t type() const noexcept
Return the TLV-TYPE of the Block.
void reset() noexcept
Reset the Block to a default-constructed state.
void parse() const
Parse TLV-VALUE into sub-elements.
Represents a CachePolicy header field.
CachePolicyType getPolicy() const
Get policy type code.
void wireDecode(const Block &wire)
Get CachePolicyType from wire format.
const Block & wireEncode() const
Encode CachePolicy into wire format.
CachePolicy & setPolicy(CachePolicyType policy)
Set policy type code.
#define NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(ClassName)
EncodingImpl< EstimatorTag > EncodingEstimator
size_t prependNonNegativeIntegerBlock(EncodingImpl< TAG > &encoder, uint32_t type, uint64_t value)
Prepend a TLV element containing a non-negative integer.
EncodingImpl< EncoderTag > EncodingBuffer
Contains classes and functions related to NDNLPv2.
CachePolicyType
Indicates the cache policy applied to a Data packet.
std::ostream & operator<<(std::ostream &os, CachePolicyType policy)