comparison orange/serialization/archives/Archive.d @ 9:99c52d46822a

Serialization works now with D2, deserialization still doesn't work
author Jacob Carlborg <doob@me.com>
date Sat, 24 Jul 2010 18:58:18 +0200
parents f7b078e85f7f
children 3d42ea434d46
comparison
equal deleted inserted replaced
8:613a0bb20207 9:99c52d46822a
7 module orange.serialization.archives.Archive; 7 module orange.serialization.archives.Archive;
8 8
9 version (Tango) 9 version (Tango)
10 import tango.util.Convert; 10 import tango.util.Convert;
11 11
12 else
13 {
14 import std.conv;
15 alias ConvError ConversionException;
16 }
17
12 import orange.serialization.archives.ArchiveException; 18 import orange.serialization.archives.ArchiveException;
13 19
14 interface IArchive 20 interface IArchive
15 { 21 {
16 void beginArchiving (); 22 void beginArchiving ();
17 void reset (); 23 void reset ();
18 } 24 }
19 25
20 abstract class Archive (U) : IArchive 26 abstract class Archive (U) : IArchive
21 { 27 {
22 alias U[] DataType; 28 version (Tango) alias U[] DataType;
29 else mixin ("alias immutable(U)[] DataType;");
23 30
24 abstract void beginArchiving (); 31 abstract void beginArchiving ();
25 abstract void beginUnarchiving (DataType data); 32 abstract void beginUnarchiving (DataType data);
26 abstract DataType data (); 33 abstract DataType data ();
27 abstract void reset (); 34 abstract void reset ();