Boost logo

Boost :

From: Dylan Trotter (trotterdylan_at_[hidden])
Date: 2005-09-10 11:04:37


> You seem to want a temporary stream (i.e. as you say, something to write
> into and read from). Does it really matter (for you) whether that is
> implemented by means of a file ? If so, what observable behavior should
> it have that makes it file-like ?

It's true that in many cases it wouldn't matter whether the stream
outputs to a file or memory. I could imagine writing very large temp
files that you might not want to have in memory.

On the other hand, maybe a temp_file_handle class is more appropriate.
The physical file would be deleted in the destructor. Using shared_ptr,
it could be used by multiple objects. It could expose a path to the
physical file to be used in any way necessary (even interprocess).

> The subject, however, suggests a temporary file, i.e. an entity in
> a file system. That, too, is important, as a number of people have
> confirmed.
>
> I don't see much relationship between them, in particular on an API
> level. Why would you lump them together ?

The original post was about streams in particular. But you're right that
it'd be more general to group the files and the streams separately.

>
> Regards,
> Stefan
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


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