XmlArchive.archiveAssociativeArray

Archives an associative array.

class XmlArchive(U = char)
void
archiveAssociativeArray
(
string keyType
,
string valueType
,
size_t length
,
string key
,
Id id
,
void delegate
()
dg
)

Parameters

keyType string

the runtime type of the keys

valueType string

the runtime type of the values

length size_t

the length of the associative array

key string

the key associated with the associative array

id Id

the id associated with the associative array

dg void delegate
()

a callback that performs the archiving of the individual keys and values

Examples

int[string] arr = ["a"[] : 1, "b" : 2, "c" : 3];

auto archive = new XmlArchive!();

archive.archive(string.stringof, int.stringof, arr.length, "arr", 0, {
    // archive the individual keys and values
});

See Also

archiveAssociativeArrayValue archiveAssociativeArrayKey

Meta