Defined in:Finds a named structure using a local reference.
Structure *FindStructure(const StructureRef& reference, int32 index = 0) const;
||The reference to the structure to find.|
||The index of the name to search for within the reference's name array. This is used internally and should be set to its default value of 0.|
FindStructurefunction finds the structure referenced by the sequence of names stored in the
referenceparameter and returns a pointer to it. If no such structure exists, then the return value is
nullptr. Only structures belonging to the subtree of the structure for which this function is called can be returned by this function. The sequence of names in the reference identify a branch along the subtree leading to the referenced structure.
The reference must be a local reference, meaning that the first name stored in the reference is a local name as indicated by a value of
falsebeing returned by the
StructureRef::GetGlobalRefFlagfunction. If the reference is not a local reference, then this function always returns
DataDescription::FindStructurefunction should be used to find a structure through a global reference.
If the specified reference has an empty name array, then the return value is always
nullptr. The empty name array is assigned to a reference data value when
nullappears in the OpenDDL file.