comparison orange/serialization/Serializer.d @ 34:068e853b9c07 experimental

Cleaned up. Updated to latest D2 compiler.
author Jacob Carlborg <doob@me.com>
date Mon, 01 Aug 2011 20:34:54 +0200
parents 4fea56a5849f
children 511d1ef4e299
comparison
equal deleted inserted replaced
33:4fea56a5849f 34:068e853b9c07
10 import tango.util.Convert : to, ConversionException; 10 import tango.util.Convert : to, ConversionException;
11 11
12 else 12 else
13 { 13 {
14 import std.conv; 14 import std.conv;
15 alias ConvError ConversionException; 15 alias ConvException ConversionException;
16 } 16 }
17 17
18 import orange.core._; 18 import orange.core._;
19 import orange.serialization._; 19 import orange.serialization._;
20 import orange.serialization.archives._; 20 import orange.serialization.archives.Archive;
21 import orange.serialization.archives.ArchiveException;
21 import orange.util._; 22 import orange.util._;
22 23
23 private 24 private
24 { 25 {
25 alias orange.util.CTFE.contains ctfeContains; 26 alias orange.util.CTFE.contains ctfeContains;
34 alias Mode.deserializing deserializing; 35 alias Mode.deserializing deserializing;
35 36
36 private char toUpper (char c) 37 private char toUpper (char c)
37 { 38 {
38 if (c >= 'a' && c <= 'z') 39 if (c >= 'a' && c <= 'z')
39 return c - 32; 40 return cast(char) (c - 32);
40 41
41 return c; 42 return c;
42 } 43 }
43 } 44 }
44 45
45 class Serializer 46 class Serializer
46 { 47 {
47 alias void delegate (ArchiveException exception, string[] data) ErrorCallback; 48 alias void delegate (ArchiveException exception, string[] data) ErrorCallback;
48 alias UntypedData Data; 49 alias Archive.UntypedData Data;
49 alias size_t Id; 50 alias Archive.Id Id;
50 51
51 private 52 private
52 { 53 {
53 struct ValueMeta 54 struct ValueMeta
54 { 55 {