XmlArchive.archiveArray

Archives an array.

class XmlArchive(U = char)
void
archiveArray
(,
string type
,
string key
,
Id id
,
void delegate
()
dg
)

Parameters

array Array

the array to archive

type string

the runtime type of an element of the array

key string

the key associated with the array

id Id

the id associated with the array

dg void delegate
()

a callback that performs the archiving of the individual elements

Examples

int[] arr = [1, 2, 3];

auto archive = new XmlArchive!();

auto a = Array(arr.ptr, arr.length, typeof(a[0]).sizeof);

archive.archive(a, typeof(a[0]).string, "arr", 0, {
    // archive the individual elements
});

Meta