Structure::ValidateProperty
Defined in:
Determines the validity of a property and returns its type and location.
TSOpenDDL.h
Prototype
virtual bool ValidateProperty(const DataDescription *dataDescription, const String<>& identifier, DataType *type, void **value);
Parameters
dataDescription |
The data description object to which the structure belongs. |
identifier |
The property identifier, as read from an OpenDDL file. |
type |
A pointer to the location that receives the data type for the property. |
value |
A pointer to the location that receives a pointer to the property's value. |
Description
The ValidateProperty
function is called for each property specified in an OpenDDL file for a particular data structure to determine whether the property is valid, and if so, what type it expects and where to store its value. This function should be overridden by any subclass of the Structure
class that defines properties, and it should return true
when the identifier
parameter identifies one of the supported properties. If the string specified by the identifier
parameter is not recognized, then the function should return false
. The default implementation of the ValidateProperty
function always returns false
.When the property identifier is valid, an implementation of the
ValidateProperty
function must write the type of data expected by the property to the location specified by the type
parameter, and it must write a pointer to the location holding the property value to the location specified by the value
parameter. The data type must be one of the following values.
For the string and reference data types, the property value must be represented by a String
object with the default template parameter of 0.An implementation of the
ValidateProperty
function must always return the same results for any given property identifier. If the same property appears multiple times in the property list for a structure, then values appearing later must overwrite earlier values, and the earlier values must be ignored.
See Also