Open Data Description Language
| OpenDDL | |
|---|---|
| Developed by | Eric Lengyel |
| Initial release | 24 September 2013 |
| Latest release | 3.0 4 January 2021 |
| Type of format | Data interchange |
| Open format? | Yes |
| Website | openddl |
The Open Data Description Language (OpenDDL) is a generic text-based language that is designed to store arbitrary data in a concise human-readable format. It can be used as a means for easily exchanging information among many programs or simply as a method for storing a program's data in an editable format.
The exact syntax of OpenDDL is described on the website openddl.org as well as in an appendix of the Open Game Engine Exchange Specification.[1]
Structures
An OpenDDL file is composed of a sequence of structures that can be either user-defined types or built-in primitive data types. The declaration of a structure consists of an identifier followed by an optional name, an optional property list, and finally, the structure's contents enclosed in braces. Raw data is always contained within structures whose identifiers are one of the data types described in the next section. For example, one may define a Point structure that holds the floating-point coordinates of a three-dimensional point as follows.
Point
{
float {1.0, 2.0, 3.0}
}
Structures can have names that allow them to be referenced from other parts of the file. Names can be global (unique throughout the file) or local (unique within the enclosing structure). A global name consists of a dollar sign followed by an identifier, and a local name consists of a percent sign followed by a dollar sign. The Point structure above could be given the global name "position" as follows.
Point $position
{
float {1.0, 2.0, 3.0}
}
Another structure could then include a reference to this point by using the ref data type:
ref {$position}
Data types
OpenDDL defines the 15 primitive data types described in the following table. Each type has a long name and a short name. Additionally, the floating-point types each have alternate long and short names.
| Type | Description |
|---|---|
bool, b
|
A boolean type that can have the value true or false.
|
int8, i8
|
An 8-bit signed integer that can have values in the range [−27, 27 − 1]. |
int16, i16
|
A 16-bit signed integer that can have values in the range [−215, 215 − 1]. |
int32, i32
|
A 32-bit signed integer that can have values in the range [−231, 231 − 1]. |
int64, i64
|
A 64-bit signed integer that can have values in the range [−263, 263 − 1]. |
uint8, u8
|
An 8-bit unsigned integer that can have values in the range [0, 28 − 1]. |
uint16, u16
|
A 16-bit unsigned integer that can have values in the range [0, 216 − 1]. |
uint32, u32
|
A 32-bit unsigned integer that can have values in the range [0, 232 − 1]. |
uint64, u64
|
A 64-bit unsigned integer that can have values in the range [0, 264 − 1]. |
half, float16, h, f16
|
A 16-bit floating-point type conforming to the standard S1E5M10 format. |
float, float32, f, f32
|
A 32-bit floating-point type conforming to the standard S1E8M23 format. |
double, float64, d, f64
|
A 64-bit floating-point type conforming to the standard S1E11M52 format. |
string, s
|
A double-quoted character string with contents encoded in UTF-8. |
ref, r
|
A sequence of structure names, or the keyword null.
|
type, t
|
A type whose values are identifiers naming types in the first column of this table. |
base64, z
|
Generic binary data encoded as Base64. |
References
- ^ Lengyel, Eric (2021). Open Game Engine Exchange Specification, Version 3.0. Terathon Software LLC. ISBN 978-0-9858117-8-5.
External links
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.