Archive.unarchiveArray

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

  1. Id unarchiveArray(string key, void delegate(size_t length) dg)
  2. void unarchiveArray(Id id, void delegate(size_t length) dg)
    interface Archive
    void
    unarchiveArray
    (,
    void delegate
    (
    size_t length
    )
    dg
    )

Parameters

id Id

the id associated with the value

dg void delegate
(
size_t length
)

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

Examples

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

See Also

unarchiveArray

Meta