Helper class to estimate size of TLV encoding. More...
#include <estimator.hpp>
Public Member Functions | |
constexpr size_t | prependBytes (span< const uint8_t > bytes) const noexcept |
Prepend a sequence of bytes. More... | |
constexpr size_t | appendBytes (span< const uint8_t > bytes) const noexcept |
Append a sequence of bytes. More... | |
template<class Iterator > | |
constexpr size_t | prependRange (Iterator first, Iterator last) const noexcept |
Prepend bytes from the range [first , last ) 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 | prependVarNumber (uint64_t n) const noexcept |
Prepend n in VarNumber encoding. More... | |
constexpr size_t | appendVarNumber (uint64_t n) const noexcept |
Append n in VarNumber encoding. More... | |
constexpr size_t | prependNonNegativeInteger (uint64_t n) const noexcept |
Prepend n in NonNegativeInteger encoding. More... | |
constexpr size_t | appendNonNegativeInteger (uint64_t n) const noexcept |
Append n in NonNegativeInteger encoding. More... | |
Helper class to estimate size of TLV encoding.
The interface of this class (mostly) matches that of the Encoder class.
Definition at line 37 of file estimator.hpp.
|
inlinenoexcept |
Prepend a sequence of bytes.
Definition at line 44 of file estimator.hpp.
|
inlinenoexcept |
Append a sequence of bytes.
Definition at line 53 of file estimator.hpp.
|
inlinenoexcept |
Prepend bytes from the range [first
, last
)
Definition at line 63 of file estimator.hpp.
|
inlinenoexcept |
Append bytes from the range [first
, last
)
Definition at line 73 of file estimator.hpp.
|
inlinenoexcept |
Prepend n
in VarNumber encoding.
Definition at line 82 of file estimator.hpp.
References ndn::tlv::sizeOfVarNumber().
Referenced by ndn::encoding::detail::BinaryBlockFast< Iterator >::makeBlock().
|
inlinenoexcept |
Append n
in VarNumber encoding.
Definition at line 91 of file estimator.hpp.
References ndn::tlv::sizeOfVarNumber().
|
inlinenoexcept |
Prepend n
in NonNegativeInteger encoding.
Definition at line 100 of file estimator.hpp.
References ndn::tlv::sizeOfNonNegativeInteger().
Referenced by ndn::name::Component::fromNumberWithMarker().
|
inlinenoexcept |
Append n
in NonNegativeInteger encoding.
Definition at line 109 of file estimator.hpp.
References ndn::tlv::sizeOfNonNegativeInteger().