XmlArchive.unarchiveObject

Unarchives the object associated with the given key.

class XmlArchive(U = char)
void
unarchiveObject
(
string key
,
out Id id
,
out Object result
,
void delegate
()
dg
)

Parameters

key string

the key associated with the object

id Id

the id associated with the object

result Object

the unarchived object

dg void delegate
()

a callback the performs the unarchiving of the individual fields

Examples

class Foo
{
    int a;
}

auto archive = new XmlArchive!();
archive.beginUnarchiving(data);

Id id;
Object o;

archive.unarchiveObject("foo", id, o, {
    // unarchive the fields of Foo
});

auto foo = cast(Foo) o;

Meta