libs11n 1.2.xThis page covers s11n 1.2. The library can be downloaded from the downloads page, as can the library manual and API docs. Examples of using the library can be found here.
1.2 is architecturally almost identical to 1.0, but it has been restructured and refactored, primarily in the name of having a more portable source tree. It also provides a number of leak guarantees which 1.0 does not correctly impose (and cannot without significant changes).
In no particular order, the significant changes and additions in 1.2, compared to 1.0, include...
Exception handlingThe exceptions support has been completely overhauled. Version 1.2 fixes all known potential leaks which (it was realized quite late) could happen during deserialization of, e.g., standard containers holding pointers. Most of the default de/serialization algorithms can now make safety and no-modification guaratees which were previously impossible to make. For client types which have special cleanup needs, it provides an API for clients to tell s11n how to clean up those types during failed deserializations.
s11nlite refactorings11nlite's interface hasn't changed much, but it is now refactored to live on top of a class, client_api<NodeType>. The purpose of this is to allow client code to very easily create their own variant of s11nlite by simply templatizing the type client_api<NodeType> to suit their needs, or via subclassing. s11nlite allows clients to plug in their own type, as long as it uses the same node type as s11nlite. See the sample under src/client/sample/mylite.cpp
Header file re-orgsMany of the 1.0 headers have their names for historical - not practical - purposes. At one point i had two completely different s11n architectures living in the same source directory, and had to differentiate their header file names. (i needed it to allow my s11n 0.6-based client code to work.) Many headers have been moved around, in particular the proxy-related headers have been reorganized to be easier to find.
Compilation speed improvementsDue mainly to the header file re-orgs, compile times for many typical client cases have been notably shortened. Test cases involving small numbers of Serializable types (1-4 or so is fairly typical) showed compile times cut by 50-80%.
Platform portability improvementsAs of version 1.1.2+ we can build under Windows :). We also ship source trees which are suitable for arbitrary platforms, without the need to generate the files which are normally generated as part of the standard build process. These require the addition of build files, such as a project file or Autotools, or can be dropped right in to your project tree.
Standalone source treeUnlike 1.0, which was built on top of several support libraries, 1.2 does not rely on external libraries for any features. It has optional support for the zfstream library (available on the downloads page), but it is not required.
Factory rewritei've rewritten the underlying factory (classloader) layer from scratch. i won't say it's any better or worse, just a bit different. This won't affect the majority of client code, since s11n provides an abstraction API into the classloader in the first place.
Potential TODOsSome potential TODOs for future 1.2.x releases, or potentially 1.3+, include:
|[home]||This site is developed in conjunction with: toc, SpiderApe, & wanderinghorse.net.||[top]|