XmlArchive.unarchiveStruct

Unarchives the struct associated with the given key.

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

Parameters

key string

the key associated with the struct

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