Archive.unarchiveStruct

Unarchives the struct associated with the given key.

  1. Id unarchiveStruct(string key, void delegate() dg)
    interface Archive
    unarchiveStruct
    (
    string key
    ,
    void delegate
    ()
    dg
    )
  2. void unarchiveStruct(Id id, void delegate() dg)

Parameters

key string

the key associated with the string

dg void delegate
()

a callback that performs the unarchiving of the individual fields

Examples

struct Foo
{
    int a;
}

auto archive = new XmlArchive!();
archive.beginUnarchiving(data);
archive.unarchiveStruct("foo", {
    // unarchive the fields of Foo
});

Meta