NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::lp::detail::FieldDecl< LOCATION, VALUE, TYPE, REPEATABLE > Class Template Reference

#include <field-decl.hpp>

Public Types

typedef LOCATION FieldLocation
 
typedef VALUE ValueType
 
typedef std::integral_constant< uint64_t, TYPE > TlvType
 
typedef std::integral_constant< bool, REPEATABLE > IsRepeatable
 

Static Public Member Functions

static ValueType decode (const Block &wire)
 decodes a field More...
 
template<typename encoding::Tag TAG, typename T >
static size_t encode (EncodingImpl< TAG > &encoder, const T &value)
 encodes a field and prepends to encoder its Block with top-level type TYPE More...
 

Detailed Description

template<typename LOCATION, typename VALUE, uint64_t TYPE, bool REPEATABLE = false>
class ndn::lp::detail::FieldDecl< LOCATION, VALUE, TYPE, REPEATABLE >

Definition at line 109 of file field-decl.hpp.

Member Typedef Documentation

◆ FieldLocation

template<typename LOCATION , typename VALUE , uint64_t TYPE, bool REPEATABLE = false>
typedef LOCATION ndn::lp::detail::FieldDecl< LOCATION, VALUE, TYPE, REPEATABLE >::FieldLocation

Definition at line 112 of file field-decl.hpp.

◆ ValueType

template<typename LOCATION , typename VALUE , uint64_t TYPE, bool REPEATABLE = false>
typedef VALUE ndn::lp::detail::FieldDecl< LOCATION, VALUE, TYPE, REPEATABLE >::ValueType

Definition at line 113 of file field-decl.hpp.

◆ TlvType

template<typename LOCATION , typename VALUE , uint64_t TYPE, bool REPEATABLE = false>
typedef std::integral_constant<uint64_t, TYPE> ndn::lp::detail::FieldDecl< LOCATION, VALUE, TYPE, REPEATABLE >::TlvType

Definition at line 114 of file field-decl.hpp.

◆ IsRepeatable

template<typename LOCATION , typename VALUE , uint64_t TYPE, bool REPEATABLE = false>
typedef std::integral_constant<bool, REPEATABLE> ndn::lp::detail::FieldDecl< LOCATION, VALUE, TYPE, REPEATABLE >::IsRepeatable

Definition at line 115 of file field-decl.hpp.

Member Function Documentation

◆ decode()

template<typename LOCATION , typename VALUE , uint64_t TYPE, bool REPEATABLE = false>
static ValueType ndn::lp::detail::FieldDecl< LOCATION, VALUE, TYPE, REPEATABLE >::decode ( const Block wire)
inlinestatic

decodes a field

Parameters
wirea Block with top-level type TYPE
Returns
value of the field

Definition at line 122 of file field-decl.hpp.

References ndn::lp::detail::DecodeHelper< TlvType, T >::decode(), ndn::to_string(), and ndn::Block::type().

◆ encode()

template<typename LOCATION , typename VALUE , uint64_t TYPE, bool REPEATABLE = false>
template<typename encoding::Tag TAG, typename T >
static size_t ndn::lp::detail::FieldDecl< LOCATION, VALUE, TYPE, REPEATABLE >::encode ( EncodingImpl< TAG > &  encoder,
const T &  value 
)
inlinestatic

encodes a field and prepends to encoder its Block with top-level type TYPE

Parameters
encoderInstance of the buffer encoder or buffer estimator
valuevalue of the field

Definition at line 137 of file field-decl.hpp.

References ndn::lp::detail::EncodeHelper< TAG, TlvType, T >::encode().


The documentation for this class was generated from the following file: