Defined in:Determines the validity of a top-level structure.
virtual bool ValidateTopLevelStructure(const Structure *structure) const;
||The top-level structure to validate.|
ValidateTopLevelStructurefunction 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
structureparameter and return
trueif it can legally appear at the top level of a file, and it should return
An implementation would typically call the
Structure::GetStructureTypefunction 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
ValidateTopLevelStructurefunction 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
ValidateTopLevelStructurefunction always returns