Tombstone Engine

Facebook Twitter YouTube IndieDB


Defined in:  TSOpenDDL.h
Determines the validity of a top-level structure.

virtual bool ValidateTopLevelStructure(const Structure *structure) const;

structure The top-level structure to validate.
The ValidateTopLevelStructure function is called each time a new structure is created at the top level of an OpenDDL file to determine whether the new structure can legally appear outside all other structures. An overriding implementation should examine the structure specified by the structure parameter and return true if it can legally appear at the top level of a file, and it should return false otherwise.

An implementation would typically call the Structure::GetStructureType function to make its decision, but other information such as the base structure type or the primitive subarray size may also be taken into account. At the time that the ValidateTopLevelStructure function is called, no data belonging to the structure is available, so the data itself cannot be used to validate any top-level structures.

The default implementation of the ValidateTopLevelStructure function always returns true.
See Also