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

Developer

API Reference

ITRIGMLELEMENT_GETINTATTRIBUTE()

Brew Release
Brew MP 1.0.2
See Also
ITRIGMLELEMENT_GetAttribute() ITRIGMLELEMENT_SetAttribute() ITRIGMLELEMENT_GetAttributeNoResolve()
Description
Resolves and returns the integer value of the given attribute on the given element.
Params
po
[]:
The element for which to get the attribute.
classId
[]:
The class ID of the attribute to get. This should be a KTrigml*ExtensionClassId constant from an extension metadata header.
id
[]:
The attribute ID of the attribute to get. This should be a KTrigml*Attr* constant from an extension metadata header.
ppIntValue
[]:
A pointer to receive the address of the resolved integer. The memory pointed to is owned by the Trigplayer; do not free it.
Interface
  • ITRIGMLELEMENT
Prototype
  •    int ITRIGMLELEMENT_GetIntAttribute(ITrigmlElement* po, AEECLSID classId, uint16 id, const int32** ppIntValue)
    
Return
  •    If the attribute exists on the element and its value was successfully
       resolved, the function will return SUCCESS and *ppValue will point to the
       resolved value of the attribute.
       If the attribute does not exist on the element, the function will return
       SUCCESS and *ppValue will be NULL.
       If the attribute exists on the element but the return value is not an integer type,
       the function will return ENOTYPE.
       If the attribute exists on the element but could not be resolved, the
       function will return an appropriate non-SUCCESS error code.
    
Side Effect
  • Any observers of the attribute value will be notified with the new resolved attribute value. Attribute resolution can therefore be an expensive operation. Do not call ITRIGMLELEMENT_GetAttribute more often than is necessary.
Comments
This function does not do any type conversion, it simply casts the returned value to a const int32 *, it is the callers responsibility to call this function only on attributes of the appropriate type.