Defined in:Performs custom processing of the structure data.
virtual DataResult ProcessData(DataDescription *dataDescription);
ProcessDatafunction can be overridden by a subclass to perform any custom processing of the data contained in a structure. This function is called for all direct subnodes of the root structure of a data file when the
DataDescription::ProcessTextfunction is called. (These correspond to the top-level data structures in the file itself.) The implementation may examine the structure's subtree and take whatever action is appropriate to process the data.
dataDescriptionparameter points to the
DataDescriptionobject to which the structure belongs. An implementation of the
ProcessDatafunction may call the
DataDescription::FindStructurefunction to find referenced structures.
If no error occurs, then the
ProcessDatafunction should return
kDataOkay. Otherwise, an error code should be returned. An implementation may return a custom error code or one of the following standard error codes.
||A structure is missing a substructure of a required type.|
||A structure contains too many substructures of a legal type.|
||The primitive data contained in a structure uses an invalid format (type or subarray size).|
||The target of a reference does not exist.|
ProcessDatafunction for each of the direct subnodes of a data structure. If an error is returned by any of these calls, then this function stops iterating through its subnodes and returns the error code immediately.
An overriding implementation of the
ProcessDatafunction is not required to call the base class implementation, but if it does, it must pass the value of the
dataDescriptionparameter through to the base class.