ndn::encoding::EncodingImpl< EstimatorTag > Class Reference

EncodingImpl specialization for TLV size estimation. More...

#include <ndn-cxx/encoding/encoding-buffer.hpp>

+ Inheritance diagram for ndn::encoding::EncodingImpl< EstimatorTag >:
+ Collaboration diagram for ndn::encoding::EncodingImpl< EstimatorTag >:

Public Member Functions

 EncodingImpl (size_t totalReserve=0, size_t totalFromBack=0)
 
constexpr size_t appendBytes (span< const uint8_t > bytes) const noexcept
 Append a sequence of bytes. More...
 
constexpr size_t appendNonNegativeInteger (uint64_t n) const noexcept
 Append n in NonNegativeInteger encoding. More...
 
template<class Iterator >
constexpr size_t appendRange (Iterator first, Iterator last) const noexcept
 Append bytes from the range [first, last) More...
 
constexpr size_t appendVarNumber (uint64_t n) const noexcept
 Append n in VarNumber encoding. More...
 
constexpr size_t prependBytes (span< const uint8_t > bytes) const noexcept
 Prepend a sequence of bytes. More...
 
constexpr size_t prependNonNegativeInteger (uint64_t n) const noexcept
 Prepend n in NonNegativeInteger encoding. More...
 
template<class Iterator >
constexpr size_t prependRange (Iterator first, Iterator last) const noexcept
 Prepend bytes from the range [first, last) More...
 
constexpr size_t prependVarNumber (uint64_t n) const noexcept
 Prepend n in VarNumber encoding. More...
 

Detailed Description

EncodingImpl specialization for TLV size estimation.

Definition at line 56 of file encoding-buffer.hpp.

Constructor & Destructor Documentation

◆ EncodingImpl()

ndn::encoding::EncodingImpl< EstimatorTag >::EncodingImpl ( size_t  totalReserve = 0,
size_t  totalFromBack = 0 
)
inlineexplicit

Definition at line 60 of file encoding-buffer.hpp.

Member Function Documentation

◆ appendBytes()

constexpr size_t ndn::encoding::Estimator::appendBytes ( span< const uint8_t >  bytes) const
inlineconstexprnoexceptinherited

Append a sequence of bytes.

Definition at line 53 of file estimator.hpp.

◆ appendNonNegativeInteger()

constexpr size_t ndn::encoding::Estimator::appendNonNegativeInteger ( uint64_t  n) const
inlineconstexprnoexceptinherited

Append n in NonNegativeInteger encoding.

Definition at line 109 of file estimator.hpp.

◆ appendRange()

template<class Iterator >
constexpr size_t ndn::encoding::Estimator::appendRange ( Iterator  first,
Iterator  last 
) const
inlineconstexprnoexceptinherited

Append bytes from the range [first, last)

Definition at line 73 of file estimator.hpp.

◆ appendVarNumber()

constexpr size_t ndn::encoding::Estimator::appendVarNumber ( uint64_t  n) const
inlineconstexprnoexceptinherited

Append n in VarNumber encoding.

Definition at line 91 of file estimator.hpp.

◆ prependBytes()

constexpr size_t ndn::encoding::Estimator::prependBytes ( span< const uint8_t >  bytes) const
inlineconstexprnoexceptinherited

Prepend a sequence of bytes.

Definition at line 44 of file estimator.hpp.

◆ prependNonNegativeInteger()

constexpr size_t ndn::encoding::Estimator::prependNonNegativeInteger ( uint64_t  n) const
inlineconstexprnoexceptinherited

Prepend n in NonNegativeInteger encoding.

Definition at line 100 of file estimator.hpp.

◆ prependRange()

template<class Iterator >
constexpr size_t ndn::encoding::Estimator::prependRange ( Iterator  first,
Iterator  last 
) const
inlineconstexprnoexceptinherited

Prepend bytes from the range [first, last)

Definition at line 63 of file estimator.hpp.

◆ prependVarNumber()

constexpr size_t ndn::encoding::Estimator::prependVarNumber ( uint64_t  n) const
inlineconstexprnoexceptinherited

Prepend n in VarNumber encoding.

Definition at line 82 of file estimator.hpp.