block-helpers.hpp File Reference
+ Include dependency graph for block-helpers.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ndn::encoding::detail::BinaryBlockFast< Iterator >
 Create a binary block copying from RandomAccessIterator. More...
 
class  ndn::encoding::detail::BinaryBlockSlow< Iterator >
 Create a binary block copying from generic InputIterator. More...
 

Namespaces

 ndn
 
 ndn::encoding
 
 ndn::encoding::detail
 

Functions

Block ndn::encoding::makeBinaryBlock (uint32_t type, const char *value, size_t length)
 Create a TLV block copying the TLV-VALUE from a raw buffer. More...
 
template<class Iterator >
Block ndn::encoding::makeBinaryBlock (uint32_t type, Iterator first, Iterator last)
 Create a TLV block copying TLV-VALUE from iterators. More...
 
Block ndn::encoding::makeBinaryBlock (uint32_t type, span< const uint8_t > value)
 Create a TLV block copying the TLV-VALUE from a byte range. More...
 
Block ndn::encoding::makeDoubleBlock (uint32_t type, double value)
 Create a TLV element containing an IEEE 754 double-precision floating-point number. More...
 
Block ndn::encoding::makeEmptyBlock (uint32_t type)
 Create an empty TLV block. More...
 
template<class U >
Block ndn::encoding::makeNestedBlock (uint32_t type, const U &value)
 Create a TLV block containing a nested TLV element. More...
 
template<class I >
Block ndn::encoding::makeNestedBlock (uint32_t type, I first, I last)
 Create a TLV block containing a sequence of nested TLV elements. More...
 
Block ndn::encoding::makeNonNegativeIntegerBlock (uint32_t type, uint64_t value)
 Create a TLV block containing a non-negative integer. More...
 
Block ndn::encoding::makeStringBlock (uint32_t type, const std::string &value)
 Create a TLV block containing a string. More...
 
template<Tag TAG>
size_t ndn::encoding::prependBinaryBlock (EncodingImpl< TAG > &encoder, uint32_t type, span< const uint8_t > value)
 Prepend a TLV element containing a sequence of raw bytes. More...
 
template size_t ndn::encoding::prependBinaryBlock< EncoderTag > (EncodingImpl< EncoderTag > &, uint32_t, span< const uint8_t >)
 
template size_t ndn::encoding::prependBinaryBlock< EstimatorTag > (EncodingImpl< EstimatorTag > &, uint32_t, span< const uint8_t >)
 
template<Tag TAG>
size_t ndn::encoding::prependBlock (EncodingImpl< TAG > &encoder, const Block &block)
 Prepend a TLV element. More...
 
template size_t ndn::encoding::prependBlock< EncoderTag > (EncodingImpl< EncoderTag > &, const Block &)
 
template size_t ndn::encoding::prependBlock< EstimatorTag > (EncodingImpl< EstimatorTag > &, const Block &)
 
template<Tag TAG>
size_t ndn::encoding::prependDoubleBlock (EncodingImpl< TAG > &encoder, uint32_t type, double value)
 Prepend a TLV element containing an IEEE 754 double-precision floating-point number. More...
 
template size_t ndn::encoding::prependDoubleBlock< EncoderTag > (EncodingImpl< EncoderTag > &, uint32_t, double)
 
template size_t ndn::encoding::prependDoubleBlock< EstimatorTag > (EncodingImpl< EstimatorTag > &, uint32_t, double)
 
template<Tag TAG>
size_t ndn::encoding::prependEmptyBlock (EncodingImpl< TAG > &encoder, uint32_t type)
 Prepend an empty TLV element. More...
 
template size_t ndn::encoding::prependEmptyBlock< EncoderTag > (EncodingImpl< EncoderTag > &, uint32_t)
 
template size_t ndn::encoding::prependEmptyBlock< EstimatorTag > (EncodingImpl< EstimatorTag > &, uint32_t)
 
template<Tag TAG, class U >
size_t ndn::encoding::prependNestedBlock (EncodingImpl< TAG > &encoder, uint32_t type, const U &value)
 Prepend a TLV element containing a nested TLV element. More...
 
template<Tag TAG, class I >
size_t ndn::encoding::prependNestedBlock (EncodingImpl< TAG > &encoder, uint32_t type, I first, I last)
 Prepend a TLV element containing a sequence of nested TLV elements. More...
 
template<Tag TAG>
size_t ndn::encoding::prependNonNegativeIntegerBlock (EncodingImpl< TAG > &encoder, uint32_t type, uint64_t value)
 Prepend a TLV element containing a non-negative integer. More...
 
template size_t ndn::encoding::prependNonNegativeIntegerBlock< EncoderTag > (EncodingImpl< EncoderTag > &, uint32_t, uint64_t)
 
template size_t ndn::encoding::prependNonNegativeIntegerBlock< EstimatorTag > (EncodingImpl< EstimatorTag > &, uint32_t, uint64_t)
 
template<Tag TAG>
size_t ndn::encoding::prependStringBlock (EncodingImpl< TAG > &encoder, uint32_t type, const std::string &value)
 Prepend a TLV element containing a string. More...
 
template size_t ndn::encoding::prependStringBlock< EncoderTag > (EncodingImpl< EncoderTag > &, uint32_t, const std::string &)
 
template size_t ndn::encoding::prependStringBlock< EstimatorTag > (EncodingImpl< EstimatorTag > &, uint32_t, const std::string &)
 
double ndn::encoding::readDouble (const Block &block)
 Read TLV-VALUE of a TLV element as an IEEE 754 double-precision floating-point number. More...
 
uint64_t ndn::encoding::readNonNegativeInteger (const Block &block)
 Read a non-negative integer from a TLV element. More...
 
template<typename R >
std::enable_if_t< std::is_integral< R >::value, R > ndn::encoding::readNonNegativeIntegerAs (const Block &block)
 Read a non-negative integer from a TLV element and cast to the specified type. More...
 
template<typename R >
std::enable_if_t< std::is_enum< R >::value, R > ndn::encoding::readNonNegativeIntegerAs (const Block &block)
 Read a non-negative integer from a TLV element and cast to the specified type. More...
 
std::string ndn::encoding::readString (const Block &block)
 Read TLV-VALUE of a TLV element as a string. More...