XmlArchive.unarchiveArray

Unarchives the value associated with the given key as an array.

  1. Id unarchiveArray(string key, void delegate(size_t) dg)
    class XmlArchive(U = char)
    Id
    unarchiveArray
    (
    string key
    ,
    void delegate
    (
    size_t
    )
    dg
    )
  2. void unarchiveArray(Id id, void delegate(size_t) dg)

Parameters

key string

the key associated with the array

dg void delegate
(
size_t
)

a callback that performs the unarchiving of the individual elements. length is the length of the archived array

Return Value

Type: Id

the id associated with the array

Examples

auto archive = new XmlArchive!();
archive.beginUnarchiving(data);
auto id = archive.unarchiveArray("arr", (size_t length) {
    auto arr = new int[length]; // pre-allocate the array
    // unarchive the individual elements of "arr"
});

See Also

unarchiveArray

Meta