Declare a field. More...
#include <ndn-cxx/lp/field-decl.hpp>
Public Types | |
using | FieldLocation = LOCATION |
using | IsRepeatable = std::bool_constant< REPEATABLE > |
using | TlvType = std::integral_constant< uint32_t, TYPE > |
using | ValueType = VALUE |
Static Public Member Functions | |
static ValueType | decode (const Block &wire) |
Decode a field. More... | |
template<typename encoding::Tag TAG> | |
static size_t | encode (EncodingImpl< TAG > &encoder, const ValueType &value) |
Encode a field and prepend to encoder . More... | |
Declare a field.
LOCATION | a tag that indicates where the field is in an LpPacket. |
VALUE | type of field value. |
TYPE | TLV-TYPE number of the field. |
REPEATABLE | whether the field is repeatable. |
DECODER_TAG | selects a specialization of DecodeHelper. |
ENCODER_TAG | selects a specialization of EncodeHelper. |
Definition at line 173 of file field-decl.hpp.
using ndn::lp::FieldDecl< LOCATION, VALUE, TYPE, REPEATABLE, DECODER_TAG, ENCODER_TAG >::FieldLocation = LOCATION |
Definition at line 176 of file field-decl.hpp.
using ndn::lp::FieldDecl< LOCATION, VALUE, TYPE, REPEATABLE, DECODER_TAG, ENCODER_TAG >::IsRepeatable = std::bool_constant<REPEATABLE> |
Definition at line 179 of file field-decl.hpp.
using ndn::lp::FieldDecl< LOCATION, VALUE, TYPE, REPEATABLE, DECODER_TAG, ENCODER_TAG >::TlvType = std::integral_constant<uint32_t, TYPE> |
Definition at line 178 of file field-decl.hpp.
using ndn::lp::FieldDecl< LOCATION, VALUE, TYPE, REPEATABLE, DECODER_TAG, ENCODER_TAG >::ValueType = VALUE |
Definition at line 177 of file field-decl.hpp.
|
inlinestatic |
Decode a field.
wire | an element with top-level TLV-TYPE TlvType::value . |
ndn::tlv::Error | decode failure. |
Definition at line 187 of file field-decl.hpp.
|
inlinestatic |
Encode a field and prepend to encoder
.
encoder | a buffer encoder or estimator. |
value | value of the field. |
Definition at line 202 of file field-decl.hpp.