ocean.util.container.map.utils.MapSerializer

Contains extensions for Map based classes to dump the contents of maps to a file or to read from a file into a map. Includes struct versioning support.

This module provides you with several ways to load/dump a map from/into a file:

* Using the specialized version SerializingMap of the class Map * Using the provided MapExtension mixin to extend a map yourself * Using the class MapSerializer to use the load/dump functions directly

See documentation of class MapSerializer for more details

Members

Classes

MapSerializer
class MapSerializer

Offers functionality to load/dump the content of Maps (optionally of anything actually, using the delegate version of the dump/load functions).

SerializingMap
class SerializingMap(V, K)

Specialized version of class Map that includes serialization capabilities using the MapExtension mixin

StructhashMap
class StructhashMap(V, K)

Slightly specialized version of Map that would simply take the raw value of structs to hash them

Functions

dumpOld
void dumpOld(BufferedOutput buffered, MapSerializer.AdderDg!(K, V) adder)

Dump function that dumps in the old format, to test whether we can still read it (and convert it)

testCombination
void testCombination(size_t iterations)

Test writing & loading of the given combination of struct types on a virtual file

Structs

S
struct S(ubyte V)

/////////// Test Loading of version 4 header

Templates

MapExtension
template MapExtension(K, V)

Template meant to be used with mixin in classes that inherit from the class Map.

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).