block-helpers.hpp File Reference
#include "block.hpp"
#include "encoding-buffer.hpp"
#include "../util/concepts.hpp"
+ 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
 Copyright (c) 2013-2017 Regents of the University of California.
 
 ndn::encoding
 
 ndn::encoding::detail
 

Functions

Block ndn::encoding::makeBinaryBlock (uint32_t type, const uint8_t *value, size_t length)
 Create a TLV block copying TLV-VALUE from raw buffer. More...
 
Block ndn::encoding::makeBinaryBlock (uint32_t type, const char *value, size_t length)
 Create a TLV block copying TLV-VALUE from 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::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...
 
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::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>
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 &)
 
uint64_t ndn::encoding::readNonNegativeInteger (const Block &block)
 Read a non-negative integer from a TLV element. More...
 
template<typename R >
std::enable_if< std::is_integral< R >::value, R >::type 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< std::is_enum< R >::value, R >::type 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...