Project

General

Profile

Actions

Feature #3100

closed

Add Block constructor to create sub-blocks reusing the underlying buffer

Added by Alex Afanasyev over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Base
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

To avoid multiple copy operations during processing of NDNLP packets, a Block should allow creation of sub-blocks reusing the underlying buffer.

/** @brief Create a Block from existing block (reusing the underlying buffer), directly
 *         specifying boundaries of the block within the buffer
 *
 *  This overload will automatically detect type and position of the value within the block
 */
Block(const Block& block,
      const Buffer::const_iterator& begin, const Buffer::const_iterator& end,
      bool verifyLength = true);
Actions

Also available in: Atom PDF