ocean.util.container.ConcatBuffer

Class templates for reusable buffers with minimal memory allocation.

Each class has its own detailed description and usage example below.

The difference between this and AppendBuffer is that AppendBuffer basically wraps a dynamic array and keeps track of the length, while this class provides a way to store multiple arrays by appending them into a single buffer. The basic ConcatBuffer class returns the slices to the appended arrays from its 'add' method. The extended SliceBuffer class internally keeps track of the appended slices, and offers opIndex and opApply methods over them.

Members

Classes

ConcatBuffer
class ConcatBuffer(T)

Concat buffer class template.

SliceBuffer
class SliceBuffer(T)

Slice buffer class template. Extends ConcatBuffer, encapsulating a buffer with a list of slices to the concatenated items.

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).