view mde/mergetag/doc/file-format-requirements.txt @ 0:d547009c104c

Repository creation. committer: Diggory Hardy <diggory.hardy@gmail.com>
author Diggory Hardy <diggory.hardy@gmail.com>
date Sat, 27 Oct 2007 18:05:39 +0100
parents
children
line wrap: on
line source

Requirements:

---	Config - named entries (map associated by strings; sections by strings)
Merging: chosing one entry over another

---	Data - list of entries, each of custom compound type (e.g. list of 3-vector over reals)
As sub blocks within a standard item (mergable: combine the blocks of multiple items).

+++	Global type for handling all this:
File consists of sections.
Each section consists of items.
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.
Items have a custom type, which can be a compound of:
+	Basic types:
++		bool
++		int (int+uint)
++		real (or float or double? no.)
++		string (char)
++		binary (ubyte[])
+	Strings (of char, wchar or dchar)
+	Fixed-length arrays (single type)
+	Variable-length arrays (single type)
+	Fixed format tuples (multiple types which are prespecified)
+	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.
To access an item, it should be found by ID, its type should be checked, and then it may be accessed.
Types are specific to items. As an optimisation, a binary format may have a list of types and index them.

+++	Basic types:
All D base types, including void, with support for writing strings.