From: rameysb (ramey_at_[hidden])
Date: 2002-03-18 14:46:17
I have just uploaded draft # 2 of my proposal for a boost library to
address saving and restoring of C++ objects. Serialization.zip
In addition to the original list of requirements (see below), and in
reponse to comments from boost members, I have implemented the
1) Archives are derived from a base class with virtual functions.
This allows applications to implement custom archive formats. The
library contains support for archives in character text, native
binary data, and wide character text.
2) More checking has been implemented to detect erroneas library usage
3) Archives no longer need to store class names. This makes them
smaller and portable across platforms.
4) Archives have a header to detect cases of erroneas usage.
5) Objects serialized through pointers no longer require a default
constructor. Any constructor can be supported. This implies that
const values and references can be saved and restored for objects
serialized through pointers.
6) System should function on platorms that fail to properly implement
partial ordering for function templates (e.g MSVC 6)
7) library, test and demo build and function properly on MINGW as
well as MSVC 7.0
8) More complete documentation.
1) wide character support for text archives still has problems.
2) needs testing on other platforms. In particular MSVC 6. I can't
test the partial ordering hack on the platforms available to me.
3) test needs enhance to test cases such as recurrsive, self
referencial and cyclicly self referntial pointers
4) consider whether it necessary and/or meaningful to try to include
serialization of iterators.
Aside from the issues noted above, the library has no KNOWN bugs.
I would ask those who have shown an interest in this library to
attempt to install it on their own platforms and try to use in one of
there own applications. Feedback from these efforts would be
invaluable to me.
My original list of requirements was:
1) Code portability - depend only on ANSI C++ facilities.
2) Code economy - exploit features of C++ such as RTTI, templates,
and multiple inheritence, etc where appropriate to make code shorter
and simpler to use.
3) Independent versioning for each class definition. That is, when a
class definition changed, older files can still be imported to the
new version of the class.
4) Pointer persistence. Pointers and the objects they point to are
restored to a state equivalent to the original state when the objects
were stored. This includes proper restoration of multiple pointers
to the same object.
5) Persistence of STL containers
6) Archive portability - should be portable from one platform to
7) Orthogonal specification of file stream output to permit seamless
filtering (e.g. encryption, compression, etc).
8) Non-intrusive. permit serializaton to be applied to unaltered
classes. That don't require that classes to be serialized be derived
from a specific base class or implement specified member functions.
This is necessary to easily permit serialization to be applied to
classes from class libraries that we don't want to have to alter.
9) Absolute minimal coding required to add serialization to ones
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk