Name | Modified | Size | Downloads / Week |
---|---|---|---|
v4.8.3 | 2017-05-07 | ||
README.md | 2016-03-11 | 3.8 kB | |
Totals: 2 Items | 3.8 kB | 0 |
TSL
TSL stands for 'Trivial Serialization Library': it is a simple framework for C++11 serialization
Features:
-
enums: an automatic underlaying type detection for enums has been implemented allowing thereby the serialization / deserialization of any type of enums through the usage of the proper primitive type APIs.
-
scalar types: supported type with std library correspondence
TSL type | std type |
---|---|
Bool | bool |
Char | char |
Int8 | int8_t |
Int16 | int16_t |
Int32 | int32_t |
Int64 | int64_t |
UInt8 | uint8_t |
UInt16 | uint16_t |
UInt32 | uint32_t |
UInt64 | uint64_t |
Float | float |
Double | double |
- supported string types:
TSL type | std type |
---|---|
String | string |
-
tsl::Variant various improvements:
- comparison operators;
- indirection operator for accessing the Variant delegate (i.e. boost::variant<tsl::Variant::Delegate>);
- implementation of tsl::Variant::Void type (through boost::blank) corresponding to the value / type of any unitialized Variant;
- every forementioned Scalar and string types are supported;
-
supported STL containers:
- sequence containers (std::array,std::deque,std::forward_list,std::list, std::vector)
- associative containers (std::map,std::multimap,std::multiset,std::set, std::unordered_map,std::unordered_multimap, std::unordered_set, std::unordered_multiset)
-
supported pointers:
- dumb pointers to Serializable objects and Serializable derived class;
- smart pointers (std::shared_ptr<>,std::unique_ptr<>) to Serializable objects and Serializable derived class;
-
TSL_Alias: Object aliases for simplified hand writing of archives. Now it is possible to specify an alias for a Serializable object or pointer to serializable object through the TSL_Alias tag and later to refer to the same object in other pointer instances specifying the alias name through the TSL_RefAlias tag (this feature is possible ONLY for pointers).
-
TSL_RefID : 'referred objects' implementation through new tag definition. Even if available for internal use only it improve the generated archive format.
-
error reporting:
- improved parsing error reporting through grammar implementation and qi::expectation_failure<> exception.
-
tsl::parser::Helper for parser errors;
-
Exception safety: introduction of the open/close() methods and archive manipulators. The [I,O]Archive destructors potentially perform a further archive parsing/generation. In order to preserve basic exception safety, the destructor never throw anymore. For the caller environment there are 2 alternatives in order to catch the eventual residual errors during the closure of the archive:
- call the [I,O]Archive::close() method before destructor call: this will actually throw en exception in case of error that can be managed by an error handler;
- append as last item in a [de]serialization chain (operator &) an archive manipulator (tsl::endg for OArchive and tsl::endp for IArchive). These manipulators will perform a call to the corresponding [I/O]Archive::close() method and will eventually throw an error; This feature definitively replaced the delayed polimorphic exception throw.
-
Runtime support extension with type name cache
-
support for pure plugin
-
support for not serializable object serialization
-
escaped character support in strings
-
auto-register proxy support for serializable objects
-
archive formats:
- xml
- json
- binary (big endian order)
Distro supported:
- Centos-7
- Debian-8
- Gentoo
- Fedora 22/23
- OpenSUSE Leap 42.1
- Ubuntu 14