Mercurial > projects > mde
comparison mde/mergetag/DefaultData.d @ 79:61ea26abe4dd
Moved mde/mergetag/parse/parse(To/From) to mde/mergetag/(de)serialize. Implemented (de)serialization of structs.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Tue, 05 Aug 2008 11:51:51 +0100 |
parents | 25cb7420dc91 |
children |
comparison
equal
deleted
inserted
replaced
78:79a1809421aa | 79:61ea26abe4dd |
---|---|
19 module mde.mergetag.DefaultData; | 19 module mde.mergetag.DefaultData; |
20 | 20 |
21 public import mde.mergetag.iface.IDataSection; | 21 public import mde.mergetag.iface.IDataSection; |
22 import mde.mergetag.exception; | 22 import mde.mergetag.exception; |
23 | 23 |
24 import mde.mergetag.parse.parseTo : parseTo; | 24 import mde.mergetag.serialize; |
25 import mde.mergetag.parse.parseFrom : parseFrom; | |
26 | 25 |
27 | 26 |
28 /************************************************************************************************* | 27 /************************************************************************************************* |
29 * Default DataSection class. | 28 * Default DataSection class. |
30 * | 29 * |
31 * Currently this is only used for headers, and thus the list of supported types has been | 30 * Supported types are given by dataTypes. |
31 * | |
32 * Currently DefaultData is only used for headers, and thus the list of supported types has been | |
32 * reduced to just those used in headers. Load order is HIGH_LOW, i.e. existing entries aren't | 33 * reduced to just those used in headers. Load order is HIGH_LOW, i.e. existing entries aren't |
33 * overwritten. | 34 * overwritten. |
34 * | |
35 * It did supports most of the basic types supported by D (excluding cent/ucent and | |
36 * imaginary/complex types) and array versions of each of these types, plus arrays of strings. | |
37 * | |
38 * Extending the class to support more types, even custom types, shouldn't be particularly | |
39 * difficult provided mde.text.parseTo and mde.text.parseFrom are extended to support the new | |
40 * types. | |
41 *************************************************************************************************/ | 35 *************************************************************************************************/ |
42 /* The implementation now uses a fair bit of generic programming. Adjusting the types supported | 36 /* The implementation now uses a fair bit of generic programming. Adjusting the types supported |
43 * should be as simple as adjusting the list dataTypes, and possibly implemting new conversions in | 37 * should be as simple as adjusting the list dataTypes, and possibly implemting new conversions in |
44 * parseFrom and parseTo if you add new types (e.g. for cent or imaginary/complex types, or user types). | 38 * parseFrom and parseTo if you add new types (e.g. for cent or imaginary/complex types, or user types). |
45 * | 39 * |