Archive.archiveStruct

Archives a struct.

interface Archive
void
archiveStruct
(
string type
,
string key
,,
void delegate
()
dg
)

Parameters

type string

the type of the struct

key string

the key associated with the struct

id Id

the id associated with the struct

dg void delegate
()

a callback that performs the archiving of the individual fields

Examples

struct Foo
{
    int a;
}

auto foo = Foo(3);

auto archive = new XmlArchive!();
archive.archiveStruct(Foo.stringof, "foo", 0, {
    // archive the fields of Foo
});

Meta