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

Developer

API Reference

ITRIGMLELEMENT_LOADFRAGMENT()

Brew Release
Brew MP 1.0.2
See Also
ITRIGMLPARSER_CreateTree() ITRIGPLAYEREX_PushParam() ITRIGPLAYEREX_PopParam()
Description
Loads a new Trigml fragment resource as into the given node.
Params
target
[]:
The element into which to load the fragment.
res
[]:
The resource path of the fragment to load.
Interface
  • ITRIGMLELEMENT
Prototype
  •    int ITRIGMLELEMENT_LoadFragment(ITrigmlElement* target, VfsPath res);
    
Return
  •    A BREW error code.
    
Side Effect
  • None
Comments
The fragment identified by the resource path is retrieved from the loaded Trigs and then parsed. Any top-level element nodes created during the parse are inserted as children of the target node. Note that this method does NOT replace any existing children of the target node. Existing children are preserved, and new children are appended to the child list. If you wish to replace the existing children, you should call ITRIGMLELEMENT_RemoveAllChildren() before calling ITRIGMLELEMENT_LoadFragment(). You can provide values for Trigml parameters in the loaded fragment by calling ITRIGPLAYEREX_PushParam() and ITRIGPLAYEREX_PopParam().