EncodingImpl specialization for actual TLV encoding. More...
#include <encoding-buffer.hpp>
Public Member Functions | |
EncodingImpl (size_t totalReserve=MAX_NDN_PACKET_SIZE, size_t reserveFromBack=400) | |
EncodingImpl (const Block &block) | |
Public Member Functions inherited from ndn::encoding::Encoder | |
Encoder (size_t totalReserve=MAX_NDN_PACKET_SIZE, size_t reserveFromBack=400) | |
Create instance of the encoder with the specified reserved sizes. More... | |
Encoder (const Encoder &)=delete | |
Encoder & | operator= (const Encoder &)=delete |
size_t | prependByte (uint8_t value) |
Prepend a byte. More... | |
size_t | appendByte (uint8_t value) |
Append a byte. More... | |
size_t | prependByteArray (const uint8_t *array, size_t length) |
Prepend a byte array array of length length . More... | |
size_t | appendByteArray (const uint8_t *array, size_t length) |
Append a byte array array of length length . More... | |
template<class Iterator > | |
size_t | prependRange (Iterator first, Iterator last) |
Prepend range of bytes from the range [first , last ) More... | |
template<class Iterator > | |
size_t | appendRange (Iterator first, Iterator last) |
Append range of bytes from the range [first , last ) More... | |
size_t | prependVarNumber (uint64_t varNumber) |
Prepend VarNumber varNumber of NDN TLV encoding. More... | |
size_t | appendVarNumber (uint64_t varNumber) |
Prepend VarNumber varNumber of NDN TLV encoding. More... | |
size_t | prependNonNegativeInteger (uint64_t integer) |
Prepend non-negative integer integer of NDN TLV encoding. More... | |
size_t | appendNonNegativeInteger (uint64_t integer) |
Append non-negative integer integer of NDN TLV encoding. More... | |
size_t | prependByteArrayBlock (uint32_t type, const uint8_t *array, size_t arraySize) |
Prepend TLV block of type type and value from buffer array of size arraySize . More... | |
size_t | appendByteArrayBlock (uint32_t type, const uint8_t *array, size_t arraySize) |
Append TLV block of type type and value from buffer array of size arraySize . More... | |
size_t | prependBlock (const Block &block) |
Prepend TLV block block . More... | |
size_t | appendBlock (const Block &block) |
Append TLV block block . More... | |
Encoder (const Block &block) | |
Create EncodingBlock from existing block. More... | |
void | reserve (size_t size, bool addInFront) |
Reserve size bytes for the underlying buffer. More... | |
void | reserveBack (size_t size) |
Reserve at least size bytes at the back of the underlying buffer. More... | |
void | reserveFront (size_t size) |
Reserve at least isze bytes at the beginning of the underlying buffer. More... | |
size_t | capacity () const |
Get size of the underlying buffer. More... | |
shared_ptr< Buffer > | getBuffer () |
Get underlying buffer. More... | |
iterator | begin () |
Get an iterator pointing to the first byte of the encoded buffer. More... | |
iterator | end () |
Get an iterator pointing to the past-the-end byte of the encoded buffer. More... | |
const_iterator | begin () const |
Get an iterator pointing to the first byte of the encoded buffer. More... | |
const_iterator | end () const |
uint8_t * | buf () |
Get a pointer to the first byte of the encoded buffer. More... | |
const uint8_t * | buf () const |
Get a pointer to the first byte of the encoded buffer. More... | |
size_t | size () const |
Get size of the encoded buffer. More... | |
Block | block (bool verifyLength=true) const |
Create Block from the underlying buffer. More... | |
Additional Inherited Members | |
Public Types inherited from ndn::encoding::Encoder | |
using | value_type = Buffer::value_type |
using | iterator = Buffer::iterator |
using | const_iterator = Buffer::const_iterator |
EncodingImpl specialization for actual TLV encoding.
Definition at line 36 of file encoding-buffer.hpp.
|
inlineexplicit |
Definition at line 40 of file encoding-buffer.hpp.
|
inlineexplicit |
Definition at line 46 of file encoding-buffer.hpp.