Node Properties

Table of contents

1. Determine whether a node exists
2. Get the node type of a node
3. Get the index/name of a node
4. Get the node policy of a node
5. Get the node property wrapper of a node

1. Determine whether a node exists
Signature:
static bool BtEngine.Exist(string ForestName, string TreeName, string NodeName)
static bool BtEngine.Exist(uint ForestIndex, uint TreeIndex, uint NodeIndex)
Description:
Determines whether a node instance with the specified (forest, tree, node) names/indices exists.
Parameters:
ForestName The name of the forest instance whose presence is to be determined.
TreeName The name of the tree instance whose presence is to be determined.
NodeName The name of the node instance whose presence is to be determined.
ForestIndex The index of the forest instance whose presence is to be determined.
TreeIndex The index of the tree instance whose presence is to be determined.
NodeIndex The index of the node instance whose presence is to be determined.
Return Value:
True if the node instance with the specified (forest, tree, node) names/indices was present; false otherwise.
Complexity:
O(log f + log t + 1), where f is the count of forest instance and t is the count of whose child tree instance.
2. Get the node type of a node
Signature:
static Tuple<bool, NodeType> BtEngine.GetNodeType(string ForestName, string TreeName, string NodeName)
static Tuple<bool, NodeType> BtEngine.GetNodeType(uint ForestIndex, uint TreeIndex, uint NodeIndex)
Description:
Gets the node type of a node instance with the specified (forest, tree, node) names/indices.
Parameters:
ForestName The name of the forest instance to locate and invoke.
TreeName The name of the tree instance to locate and invoke.
NodeName The name of the node instance to locate and invoke.
ForestIndex The index of the forest instance to locate and invoke.
TreeIndex The index of the tree instance to locate and invoke.
NodeIndex The index of the node instance to locate and invoke.
Return Value:
A tuple. Item1: true if the node instance with the specified (forest, tree, node) names/indices was present; false otherwise. Item2: the node type of the node instance if Item1 is true; NodeType.Forest otherwise.
Complexity:
O(log f + log t + 1), where f is the count of forest instance and t is the count of whose child tree instance.
3. Get the index/name of a node
Signature:
static Tuple<bool, uint> BtEngine.GetIndex(string ForestName, string TreeName, string NodeName)
static Tuple<bool, string> BtEngine.GetName(uint ForestIndex, uint TreeIndex, uint NodeIndex)
Description:
Gets the index/name of a node instance with the specified (forest, tree, node) names/indices.
Parameters:
ForestName The name of the forest instance to locate and invoke.
TreeName The name of the tree instance to locate and invoke.
NodeName The name of the node instance to locate and invoke.
ForestIndex The index of the forest instance to locate and invoke.
TreeIndex The index of the tree instance to locate and invoke.
NodeIndex The index of the node instance to locate and invoke.
Return Value:
A tuple. Item1: true if the node instance with the specified (forest, tree, node) names/indices was present; false otherwise. Item2: the index/name of the node instance if Item1 is true; 0/an empty string otherwise.
Complexity:
O(log f + log t + 1), where f is the count of forest instance and t is the count of whose child tree instance.
4. Get the node policy of a node
Signature:
static Tuple<bool, NodePolicy> BtEngine.GetNodePolicy(string ForestName, string TreeName, string NodeName)
static Tuple<bool, NodePolicy> BtEngine.GetNodePolicy(uint ForestIndex, uint TreeIndex, uint NodeIndex)
Description:
Gets the node policy of the node instance with the specified (forest, tree, node) names/indices.
Parameters:
ForestName The name of the forest instance to locate and invoke.
TreeName The name of the tree instance to locate and invoke.
NodeName The name of the node instance to locate and invoke.
ForestIndex The index of the forest instance to locate and invoke.
TreeIndex The index of the tree instance to locate and invoke.
NodeIndex The index of the node instance to locate and invoke.
Return Value:
A tuple. Item1: true if the node instance with the specified (forest, tree, node) names/indices was present and whose node type is valid to have policy definition; false otherwise. Item2: the node policy of the node instance if Item1 is true; null otherwise.
Complexity:
O(log f + log t + 1), where f is the count of forest instance and t is the count of whose child tree instance.
5. Get the node property wrapper of a node
Signature:
static Tuple<bool, NodePropWrap> BtEngine.GetNodePropWrap(string ForestName, string TreeName, string NodeName)
static Tuple<bool, NodePropWrap> BtEngine.GetNodePropWrap(uint ForestIndex, uint TreeIndex, uint NodeIndex)
Description:
Gets a node property wrapper that contains all the information of a node instance with the specified (forest, tree, node) names/indices.
Parameters:
ForestName The name of the forest instance to locate and invoke.
TreeName The name of the tree instance to locate and invoke.
NodeName The name of the node instance to locate and invoke.
ForestIndex The index of the forest instance to locate and invoke.
TreeIndex The index of the tree instance to locate and invoke.
NodeIndex The index of the node instance to locate and invoke.
Return Value:
A tuple. Item1: true if the node instance with the specified (forest, tree, node) names/indices was present; false otherwise. Item2: a node property wrapper that contains all the information of the node instance if Item1 is true; null otherwise.
Complexity:
O(log f + log t + 1), where f is the count of forest instance and t is the count of whose child tree instance.