24 #ifndef NDN_ENCODING_BLOCK_HPP 25 #define NDN_ENCODING_BLOCK_HPP 27 #include "../common.hpp" 81 const Buffer::const_iterator& begin,
const Buffer::const_iterator& end,
82 bool verifyLength =
true);
90 const Buffer::const_iterator& begin,
const Buffer::const_iterator& end,
91 bool verifyLength =
true);
95 Block(
const uint8_t* buffer,
size_t maxlength);
99 Block(
const void* buffer,
size_t maxlength);
107 const Buffer::const_iterator& begin,
const Buffer::const_iterator& end,
108 const Buffer::const_iterator& valueBegin,
const Buffer::const_iterator& valueEnd);
113 Block(uint32_t type);
134 fromStream(std::istream& is);
147 static std::tuple<bool, Block>
157 std::tie(isOk, block) = Block::fromBuffer(buffer, offset);
171 static std::tuple<bool, Block>
172 fromBuffer(
const uint8_t* buffer,
size_t maxSize);
178 fromBuffer(
const uint8_t* buffer,
size_t maxSize,
Block& block))
181 std::tie(isOk, block) = Block::fromBuffer(buffer, maxSize);
206 Buffer::const_iterator
209 Buffer::const_iterator
227 Buffer::const_iterator
230 Buffer::const_iterator
256 get(uint32_t type)
const;
258 element_const_iterator
259 find(uint32_t type)
const;
267 remove(uint32_t type);
270 erase(element_const_iterator position);
273 erase(element_const_iterator first, element_const_iterator last);
276 push_back(
const Block& element);
285 insert(element_const_iterator pos,
const Block& element);
289 const element_container&
292 element_const_iterator
293 elements_begin()
const;
295 element_const_iterator
296 elements_end()
const;
299 elements_size()
const;
302 blockFromValue()
const;
307 shared_ptr<const Buffer>
318 operator boost::asio::const_buffer()
const;
339 inline shared_ptr<const Buffer>
340 Block::getBuffer()
const 351 inline Buffer::const_iterator
352 Block::value_begin()
const 354 return m_value_begin;
357 inline Buffer::const_iterator
358 Block::value_end()
const 364 Block::elements()
const 371 #endif // NDN_ENCODING_BLOCK_HPP
shared_ptr< const Buffer > m_buffer
Copyright (c) 2011-2015 Regents of the University of California.
Error(const std::string &what)
Copyright (c) 2013-2015 Regents of the University of California.
Buffer::const_iterator m_begin
element_container::iterator element_iterator
Class representing a wire element of NDN-TLV packet format.
DEPRECATED(static bool fromBuffer(const ConstBufferPtr &buffer, size_t offset, Block &block))
Table::const_iterator iterator
Buffer::const_iterator m_value_end
EncodingImpl< EncoderTag > EncodingBuffer
DEPRECATED(static bool fromBuffer(const uint8_t *buffer, size_t maxSize, Block &block))
element_container::const_iterator element_const_iterator
std::vector< Block > element_container
bool operator!=(const GlobalRouter::Incidency &a, const GlobalRouter::Incidency &b)
element_container m_subBlocks
Buffer::const_iterator m_end
Buffer::const_iterator m_value_begin
shared_ptr< const Buffer > ConstBufferPtr
represents an error in TLV encoding or decoding
bool operator==(const GlobalRouter::Incidency &a, const GlobalRouter::Incidency &b)