Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2008-08-26 18:08:09


look at the tutorial demo.

Make a test program with nothing in it.

add serialization for just one class - that doesn't depend on any other
classes.

when you've got that, add the classes for the next layer up.

and so on

until you have a test program which tests/demos serializaton
of your complex class.

Robert Ramey

Diane wrote:
> I have a large, complex struct that is made up of many levels of
> structs, getting eventually to int, char*, enum, etc. There are also
> pointers to structs and arrays of pointers. There are no STL types
> within these structures.
>
> I am trying to wrap my head around how I can use boost.serialization
> for this, without modifying the structures themselves (I can't make
> changes to the definitions).
>
> Does anyone know the best way to do this? I saw several mentions of
> wrapper classes for serializing a float and figure I could use that
> approach, but I think I would have to make a mirror structure that's
> made up of my struct wrappers and copy the data over from the real
> struct into these classes. Or I guess I could use pointers, but I
> would still have to create this second monster. Is that really the
> best possibility?
>
> Any help is appreciated!
>
> Thanks,
> Diane


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net