

This topic is perhaps the most complex syntax issue in the file format, and it is very strict. For example:Ī semicolon-separated list of strings.

For example:Ī semicolon-separated list of floats. The syntax is as follows:Ī semicolon-separated list of integers. See Templates for more information.Ī reference to a previously encountered data object. The types of nested data objects allowed in the hierarchy may be restricted. This allows the hierarchical nature of the file format to be expressed.

(See earlier for the syntax definition.)ĭata members can be one of the following: data object, data reference, integer list, float list, or string list.Ī nested data object. This part is compulsory and must match a previously defined data type or primitive. This section discusses the following parts of data objects: Each has a corresponding template that specifies the data type. Multiple header data objects can be used to switch between binary and text within the file.ĭata objects contain the actual data or a reference to that data. If this bit is clear, the following data in the file is binary. The flags member, if defined, should be a DWORD. If a flags member is available, it will be used to determine how the following data is interpreted. If present, this header will be read by the DirectX file format API. It is recommended that each application define such a template and use it to define application-specific information, such as version information. There is one special templatethe Header template. The absence of either of the above indicates a closed template. The syntax for indicating an open template is three periods enclosed by square brackets.Ī comma-separated list of named data types followed optionally by their UUIDs enclosed by square brackets indicates a restricted template. An open template has no restrictions, a closed template rejects all data types, and a restricted template allows a named list of data types. These restrictions determine which data types may appear in the immediate hierarchy of a data object defined by the template. Templates may be open, closed, or restricted. can either be an integer or a named reference to another template member whose value is then substituted.Īrrays may be n-dimensional, where n is determined by the number of paired square brackets trailing the statement. No forward references are allowed.Īny valid data type can be expressed as an array in the template definition. Valid primitive data types are as follows:įormatted C-string (currently unsupported)Īdditional data types defined by templates encountered earlier in the data stream can also be referenced within a template definition. Template members consist of a named data type followed by an optional name or an array of a named data type.
#DIRECTX XFILE SOFTWARE#
It must not begin with a digit.Ī universally unique identifier (UUID) formatted to the Open Software Foundation's Distributed Computing Environment standardĪnd surrounded by angle brackets "". This is an alphanumeric name that may include the underscore character "_". This section discusses the following aspects of a template:Įxample templates are presented in Examples. Templates define how the data stream is interpretedthe data is modulated by the template definition. A comment begins with either C++ style double-slashes "//", or a number sign "#". Comments can occur anywhere in the data stream.

The header contains the following:Ĭomments are only applicable in text files. The variable length header is compulsory and must be at the beginning of the data stream. The following words are reserved and must not be used:
#DIRECTX XFILE FREE#
It is template-driven and is free of any usage knowledge. The DirectX file format is an architecture- and context-free file format.
