C4 Engine
C4 Engine API Documentation

class Structure

Defined in:  TSOpenDDL.h
The Structure class represents a data structure in an OpenDDL file.

class Structure : public Tree<Structure>, public MapElement<Structure>

Member Functions
Structure::GetStructureType Returns the structure type.
Structure::GetBaseStructureType Returns the base structure type.
Structure::SetBaseStructureType Returns the base structure type.
Structure::GetStructureName Returns the structure name.
Structure::GetGlobalNameFlag Returns a boolean value indicating whether a structure's name is global.
Structure::FindStructure Finds a named structure using a local reference.
Structure::ValidateProperty Determines the validity of a property and returns its type and location.
Structure::ValidateSubstructure Determines the validity of a substructure.
Structure::GetStateValue Translates a state identifier into a state value.
Structure::ProcessData Performs custom processing of the structure data.

Structure(StructureType type);

type The type of the structure.
The Structure class is the base class for objects that represent data structures in an Open Data Description Language (OpenDDL) file. Structures of a specific data type are represented by objects whose types are subclasses of the Structure class.

Structures corresponding to built-in primitive data types are represented by objects whose type is a specialization of the DataStructure class template, and these all have a common base class of type PrimitiveStructure that is a direct subclass of the Structure class.

Custom data structures defined by specific OpenDDL-based file formats are represented by application-defined subclasses of the Structure class. When an OpenDDL file is parsed, the DataDescription::CreateStructure function is called to construct the proper subclass for a given type identifier.

Structure objects are organized into a tree hierarchy that can be traversed using the functions of the Tree base class. The tree hierarchy corresponds to the data layout in the OpenDDL file.

Subclasses for custom data structures should specify a unique 32-bit integer for the type parameter, normally represented by a four-character code. All four-character codes consisting only of uppercase letters and decimal digits are reserved for use by the engine.
Base Classes
Tree<Structure> Structure objects are organized in a tree hierarchy.
MapElement<Structure> Used internally by the DataDescription class.
See Also




Wiki Articles

Open Data Description Language