Trivial Serialization Library

Categoria: Projects
Pubblicato Domenica, 30 Settembre 2012 18:03
Scritto da Giampiero Gabbiani
Visite: 5147

Trivial Serialization Library (TSL) is a serialization framework written in C++11.

It cames as part of a major project for which I needed some code in order to save the configurations. Since the libs/projects I found on internet were all - for different reasons - not satisfying me, I wrote [a new] one by myself.

Guidelines

TSL is thought to be easy to learn for simple serialization tasks. Under this point of view the excellent  Boost.serialization was a good staring point in both negatives and positives. Trying using it in my code I got the impression of a great library with an efficient design but with a high degree of complexity for the final user (or at least it was difficult for me). The strong template orientation of its design, makes it a perfect example of modern code for solving the serialization problem with C++, but the static polimorphism concept behind it is not exactly what I mean for 'simple', particularly with dynamic plugins, one of my projects pre-reqs. When I realized I was spending too much time in order to understand how to use it, I decided to write a new one.

Given that, many of the concepts introduced in the Boost.serialization library were re-implemented in the TSL too (archive concept and the unique operator '&' for example). The main difference is that the flexibility of the C++ templates for the final user is nevertheless based on dynamic polimorphism through usage of virtual methods, setting the resulting code something in the middle between a pure C++ implementation and the 'traditional' Java behavour.

Features

Further description:

Archives

Streams

Writing a serializable class

Serializing the unserializables...

Error handling

Pointers

Plugins and DLL

References

SourceForge download page