i’m experimenting in the 1.3.x source tree and just came up with some helper code to enable the following:
Assume that we have a couple of std::map objects, named map and map2. Here’s what we need to do to serialize them and a few other bits:
typedef s11nlite::node_type NT; NT n; typedef SerializeChainer<NT> Chain; Chain chain( n ); chain( "map", map ). set("foo","barre"). set("meaning",42.42) ( "map2", map2, s11n::map::map_serializable_proxy() ) ( "seven", 7, s11n::serialize_to_subnode_f<NT>("a_subnode") ) ( "a_string", std::string("hello, world") ) ;
s11nlite::save( n, std::cout );
The 3rd argument to the operator() calls is a binary serialization functor which is used to do the serialization. Once such a wrapper is in place for deserialization i’ll add it to the public API somewhere.
Subversion appears to be all the rage in source control these days, but i’ve never found it to be worth switching to. Quite frankly, i’ve never had any significant problems with CVS, and i find the limitations of CVS realistic and manageable without significant effort. CVS is trivial to set up and easy to use. However, tempted as i am by newer technologies…
A week or so ago i experimented with SVN to find out how best to port the s11n source tree from CVS to SVN. After an hour or so of playing around it became clear to me that SVN only supports one repository (with an arbitrary number of brances) per SVN-root, as opposed to CVS’ arbitrary number of repositories under any given CVSROOT. That means that i can’t possibly switch the s11n tree to SVN because s11n has over 10 repositories at the moment (granted, most are outdated and unmaintained).
So… CVS it is for the forseeable future.