s11n.net
Save the planet. Save the trees. Save your data, man.
Project powered by:
SourceForge.net

Sample client-side s11n code

Hierarchies of objects.

Subclassing serialization behaviour in a class hierarchy is quiet straightforward in s11n. Rather than write up a long description of the details we will refer the reader to the the library manual and this demonstration source file: demo_hierarchy.cpp (also available in the s11n source tree, under src/client/sample/).

ACHTUNG: that source file refers to s11nlite::node_traits_type, which didn't exist until version 0.9.4. For use in 0.9.3 you can remove those references and change the NT::class_name(dest,"Foo") calls to dest.impl_class("Foo"). With that change it might also work with 0.9.2, but won't work with any versions older than that (because older versions are missing the type-traits features altogether).