Click to See Complete Forum and Search --> : generic serializer interface


staticVoid
July 8th, 2008, 07:29 AM
hi, I'm trying to implement a generic serializer interface where each implementation is responsible for serializing some provided data, examples of implementation could be xml, binary etc. where the object would pass its data to a standard interface and each implementation would serialize the data differently.

Does anyone know of any good examples of this type of interface? all I can find is an ISerializable interface where each object must implement a serialize and deserialize method.

Codeplug
July 8th, 2008, 02:59 PM
http://www.boost.org/doc/libs/1_35_0/libs/serialization/doc/index.html

gg

TheCPUWizard
July 8th, 2008, 03:19 PM
The model used by .NET is worth evaluating if you are looking for a custom solution (in native C++). It is well documented and very highly extensible.

Many of the design primciples (but none of the implementation) can be leveraged...

exterminator
July 9th, 2008, 09:54 AM
boost::serialization served me well for my needs of serialization capabilities and yes, it does support XML, binary, text and probably any custom archive type that you may want.

The support can be applied in both an intrusive and a non-intrusive way. You are welcome to ask here if you face any problems or mail on the boost mailing lists.