XmlArchive.archiveStruct

Archives a struct.

class XmlArchive(U = char)
void
archiveStruct
(
string type
,
string key
,
Id id
,
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