28 BOOST_CONCEPT_ASSERT((WireEncodable<MetaInfo>));
    29 BOOST_CONCEPT_ASSERT((WireEncodableWithEncodingBuffer<MetaInfo>));
    30 BOOST_CONCEPT_ASSERT((WireDecodable<MetaInfo>));
    31 static_assert(std::is_base_of<tlv::Error, MetaInfo::Error>::value,
    32               "MetaInfo::Error must inherit from tlv::Error");
    56   if (freshnessPeriod < time::milliseconds::zero()) {
    57     NDN_THROW(std::invalid_argument(
"FreshnessPeriod must be >= 0"));
    60   m_freshnessPeriod = freshnessPeriod;
    72 const std::list<Block>&
    81   for (
const auto& block : info) {
    82     if (block.type() < 128 || block.type() > 252)
    83       NDN_THROW(
Error(
"AppMetaInfo block has type outside the application range [128, 252]"));
    94   if (!(128 <= block.
type() && block.
type() <= 252))
    95     NDN_THROW(
Error(
"AppMetaInfo block has type outside the application range [128, 252]"));
    98   m_appMetaInfo.push_back(block);
   105   for (
auto it = m_appMetaInfo.begin(); it != m_appMetaInfo.end(); ++it) {
   108       m_appMetaInfo.erase(it);
   118   auto it = std::find_if(m_appMetaInfo.begin(), m_appMetaInfo.end(),
   120   return it != m_appMetaInfo.end() ? &*it : 
nullptr;
   123 template<encoding::Tag TAG>
   133   size_t totalLength = 0;
   135   for (
auto it = m_appMetaInfo.rbegin(); it != m_appMetaInfo.rend(); ++it) {
   136     totalLength += encoder.prependBlock(*it);
   140   if (m_finalBlockId) {
   147                                                   static_cast<uint64_t>(m_freshnessPeriod.count()));
   155   totalLength += encoder.prependVarNumber(totalLength);
   174   m_wire = buffer.block();
   194     m_type = readNonNegativeIntegerAs<uint32_t>(*val);
   212     m_finalBlockId.emplace(val->blockFromValue());
   220   for (; val != m_wire.
elements().end(); ++val) {
   221     m_appMetaInfo.push_back(*val);
   229   os << 
"ContentType: " << info.
getType();
   238     os << 
", FinalBlockId: ";
   244     os << 
", AppMetaInfoTlvType: " << block.type();
 
size_t prependNonNegativeIntegerBlock(EncodingImpl< TAG > &encoder, uint32_t type, uint64_t value)
Prepend a TLV element containing a non-negative integer. 
std::ostream & operator<<(std::ostream &os, const Data &data)
size_t prependNestedBlock(EncodingImpl< TAG > &encoder, uint32_t type, const U &value)
Prepend a TLV element containing a nested TLV element. 
void parse() const
Parse TLV-VALUE into sub-elements. 
Represents a TLV element of NDN packet format. 
bool hasWire() const noexcept
Check if the Block contains a fully encoded wire representation. 
element_const_iterator elements_begin() const
Equivalent to elements().begin() 
uint64_t readNonNegativeInteger(const Block &block)
Read a non-negative integer from a TLV element. 
const element_container & elements() const
Get container of sub-elements. 
const time::milliseconds DEFAULT_FRESHNESS_PERIOD
element_const_iterator elements_end() const
Equivalent to elements().end() 
void reset() noexcept
Reset the Block to a default-constructed state. 
#define NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(ClassName)
uint64_t tlvType
TLV-TYPE of the field; 0 if field does not exist. 
EncodingImpl< EncoderTag > EncodingBuffer
const nullopt_t nullopt((nullopt_t::init()))
uint32_t type() const
Return the TLV-TYPE of the Block. 
EncodingImpl< EstimatorTag > EncodingEstimator