|
Boost : |
From: Slava, Alex (raf.devel_at_[hidden])
Date: 2006-05-20 00:28:32
On 5/18/06, Beman Dawes <bdawes_at_[hidden]> wrote:
> * It isn't possible for a regular file implementation to efficiently support
> non-constant iterators, because there is no way to tell when a buffer has
> been written into, and thus must be rewritten to disk. An update() function
> is needed. It can be a no-op on memory-mapped implementations.
>
We probably should, something like fflush() in C library. And it may
not necessarily be no-op for MMF, because there are syncronization
routines for this facility, so it might make sense to use them.
> * Note that a regular file implementation of an STL iterator based interface
> may be more efficient than fread/fwrite, because unnecessary copying of data
> is eliminated. I'm really curious to see timings on this.
Highly unlikely, but we will perform the test and post the results.
>
> * Your design uses a class template for the record type, so is limited to
> files containing a single type. Real files often contain a mix of types. By
> use of member templates, it is easy to support files containing a mixture of
> types. If that isn't clear, I can post an example of an experimental
> interface that does so.
This seems to be a burning question, and could significantly affect
implementation.. Could you please post an example ASAP ?
>
> That should be enough to start discussion!
>
> --Beman
>
-- Svyatoslav Trukhanov, Oleksii Ursulenko
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk