Commit graph

1 commit

Author SHA1 Message Date
Patrick Ohly 50101688df DataBlob: abstract access to chunks of data
The goal of the DataBlob base class is encapsulating read/write
access to permanent data storage *on demand*. Comparing it to
files, it is more like a path name than a file handle.

boost::shared_ptr are used a) because it automates deletion of
the actual data streams and b) some implementations of DataBlob
might have to share access to these instances.

One possible implementation (included in this patch) is indeed
a plain file. It writes into a temporary file and only renames
it to the final path name on success, which emulates the behavior
of the FileConfigNode. The actual implementation of this renaming
was moved into a separate class, the SafeOstream.

Another (to be added later) is a chunk of data inside a larger file.
This is needed for embedding different .ini style files inside
one large text file, as required for MBC #1208).
2010-05-04 09:39:19 +02:00