API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

ITRIGMLELEMENT_ITERATEATTRIBUTES()

Brew Release
Brew MP 1.0.2
See Also
ITRIGMLELEMENT_GetAttribute()
Description
Iterates a TrigML element's attributes and invokes the given callback function for each one.
Params
piElement
[]:
The element whose attributes to iterate.
pCallback
[]:
The function to call for each attribute.
pUserData
[]:
An application-defined data context that will be supplied as a parameter to each call to *pCallback.
pMetadata
[]:
Varies with each call to *pCallback over the metadata entries for each attribute of the element. You can retrieve the attribute's value as
Interface
  • ITRIGMLELEMENT
Prototype
  •    typedef void IterateAttributesFn(ITrigmlElement* piElement,
                                        const TrigmlAttributeMetadata* pMetadata,
                                        void* pUserData);
    
       void ITRIGMLELEMENT_IterateAttributes(ITrigmlElement* piElement,
                                             IterateAttributesFn* pCallback,
                                             void* pUserData);
    
Return
  •    None
    
Side Effect
  • None
Comments
Be aware that some elements can have a large number of attributes (e.g. allows around 30). While it is sometimes useful to be able to iterate an element's attributes (e.g. for tracing), you should avoid doing so if it's not strictly necessary. Prefer a solution that uses ITRIGMLEXTENSION_AttributeModified() notifications instead.