MapExtension

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

Extends the class with a load() and dump() function. The mixed in class has to initialize the member 'serializer' in its constructor.

See SerializingMap for an usage example

Members

Aliases

CheckDg
alias CheckDg = bool delegate(ref K, ref V)

Delegate used to check whether a given record should be dumped or loaded

Functions

dump
void dump(IConduit io_device)

Dumps a map to an IO device

dump
void dump(cstring file_path, CheckDg check)

Writes a map to a file.

dump
void dump(cstring file_path)

Dumps a map into a file

dump
void dump(IConduit io_device, CheckDg check)

Writes a map to an IO device.

load
void load(cstring file_path)

Loads a file into the map

load
void load(IConduit io_device)

Loads a file into the map

load
void load(cstring file_path, CheckDg check)

Loads a file into the map

load
void load(IConduit io_device, CheckDg check)

Loads a file into the map

Variables

serializer
MapSerializer serializer;

Instance of the serializer, needs to be initialized in the class constructor

Parameters

K

key type of the map

V

value type of the map

Meta