Boost logo

Boost :

Subject: Re: [boost] Interest in a simple buffer abstraction?
From: Boris Kolpackov (boris_at_[hidden])
Date: 2011-01-27 14:29:46

Hi Vicente,

Vicente Botet <vicente.botet_at_[hidden]> writes:

> I'm working on a frame concept, which is something like a bidirectional
> buffer. It allows to prepend and append binary data, and obtain/remove the
> header and the trailer.
> In addition we can split a frame in fragments and join fragments to make a
> frame.

That sounds like a multi-block buffer, i.e., a buffer that instead of
one contiguous memory block manages a sequence of such blocks. While
this would allow more efficient resizing, prepending, etc., the
interface becomes somewhat more complicated. But it can be another
implementation, in addition to the simple buffer.

I didn't want to mention this possibility initially in order to keep
things simple, but it seem people here are more interested in the
complex than simple ;-).


Boris Kolpackov, Code Synthesis
Compiler-based ORM system for C++
Open-source XML data binding for C++
XML data binding for embedded systems

Boost list run by bdawes at, gregod at, cpdaniel at, john at