view codeDoc/file/mergetag/file-format-requirements.txt @ 82:ac1e3fd07275

New ssi file format. (De)serializer now supports non-ascii wide characters (encoded to UTF-8) and no longer supports non-ascii 8-bit chars which would result in bad UTF-8. Moved/renamed a few things left over from the last commit.
author Diggory Hardy <diggory.hardy@gmail.com>
date Sat, 30 Aug 2008 09:37:35 +0100
parents codeDoc/mergetag/file-format-requirements.txt@611f7b9063c6
children
line wrap: on
line source

Copyright © 2007-2008 Diggory Hardy
License: GNU General Public License version 2 or later (see COPYING)


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.