LVParseTree objects are fully copyable and assignable.
- H_PARSE_TREE LVParseTree_Create()
H_PARSE_TREE LVParseTree_CreateFromCopy(H_PARSE_TREE Other)
void LVParseTree_Copy(H_PARSE_TREE Tree, H_PARSE_TREE Other)
void LVParseTree_Release(H_PARSE_TREE Tree)
A handle to a parse tree being released or copied into
A handle to a parse tree being copied.
CreateFromCopy and Copy both perform deep copies on the handles in question. Both handles will have to be released after either function call to release all allocated memory. Tree handles given to the user via LV_SRE_CreateParseTree must also be released.
int VOICECHANNEL = 1;
// Open the port and do a decode
// When the decode is finished, grab a parse tree handle
// Here, we create an empty handle. This is useful if you want to declare
// your parse tree outside of any function.
H_PARSE_TREE Tree = LVParseTree_Create();
// Now, use the LV_SRE function to fill in the information.
// secondTree will have all of the same attributes as Tree.
H_PARSE_TREE secondTree = LVParseTree_CreateFromCopy(Tree);
// Alternatively, we could use the create function to break this up into
// two steps. Remember that the first argument is the destination tree,
// and the second one is the tree from which we are copying information.
H_PARSE_TREE thirdTree = LVParseTree_Create();
// After you are done using the parse trees, make sure to delete all
// trees created throughout the program.