Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module main;
- import orange.core._;
- import orange.serialization._;
- import orange.serialization.archives._;
- class Display
- {
- int x;
- }
- class Widget
- {
- Display d;
- Display e;
- }
- Display display;
- void main()
- {
- auto archive = new XmlArchive!(char);
- auto serializer = new Serializer(archive);
- display = new Display;
- display.x = 3;
- auto w = new Widget;
- w.d = display;
- w.e = display;
- serializer.serialize(w);
- println(archive.data);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement