Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2006-02-12 11:59:56


Reece Dunn wrote:
> Andy Little wrote:

> With this in place, transfering C++ objects across processes becomes
> easy if you know the type of object being passed. Boost already has a
> mechanism to
> do this (serialization), so you could make use of the
> Boost.Serialization library to persist the objects to a shmem memory
> block rather than a file. Therefore, the only thing that the shmem
> needs to provide is a serialization archive that works for its shared
> memory resources.

actually, serialization uses i/o provide by an underlying stream. So all
one
would need is a variation on std::strstream which uses shmem rather than
the program memory - and you be all done!

> What would be nice is if the I/O part of the serialization could be
> seperate from the archive format. (I am not sure this is possible
> with the current serialization library).

This is the way it is now - see docs.

That way, you could do:
>
> object --> binary archive --> shmem | shmem --> binary archive -->
> object
>
> or
>
> object --> xml archive --> shmem | shmem --> xml archive --> object
>
> where shmem provides what is needed by the different archives in
> terms of I/O.

> Does the shmem library provide an I/O stream library sink and source?
> If it did, then it would be easy to serialize data using exising C++
> streams.

as well as the serializaton libary

Robert Ramey


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