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

-- 
Boris Kolpackov, Code Synthesis        http://codesynthesis.com/~boris/blog
Compiler-based ORM system for C++      http://codesynthesis.com/products/odb
Open-source XML data binding for C++   http://codesynthesis.com/products/xsd
XML data binding for embedded systems  http://codesynthesis.com/products/xsde

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk