0
|
1 Requirements:
|
|
2
|
|
3 --- Config - named entries (map associated by strings; sections by strings)
|
|
4 Merging: chosing one entry over another
|
|
5
|
|
6 --- Data - list of entries, each of custom compound type (e.g. list of 3-vector over reals)
|
|
7 As sub blocks within a standard item (mergable: combine the blocks of multiple items).
|
|
8
|
|
9 +++ Global type for handling all this:
|
|
10 File consists of sections.
|
|
11 Each section consists of items.
|
|
12 Items are sorted by ID and not by type, i.e. if two items with the same ID but different types exist, merging rules are used to choose between them.
|
|
13 Items have a custom type, which can be a compound of:
|
|
14 + Basic types:
|
|
15 ++ bool
|
|
16 ++ int (int+uint)
|
|
17 ++ real (or float or double? no.)
|
|
18 ++ string (char)
|
|
19 ++ binary (ubyte[])
|
|
20 + Strings (of char, wchar or dchar)
|
|
21 + Fixed-length arrays (single type)
|
|
22 + Variable-length arrays (single type)
|
|
23 + Fixed format tuples (multiple types which are prespecified)
|
|
24 + The top-most type may be a "data list", which is identical to a variable-length array accept that merging items with identical types will combine their lists instead of choosing one over the other.
|
|
25 To access an item, it should be found by ID, its type should be checked, and then it may be accessed.
|
|
26 Types are specific to items. As an optimisation, a binary format may have a list of types and index them.
|
|
27
|
|
28 +++ Basic types:
|
|
29 All D base types, including void, with support for writing strings.
|