Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
|
TreeNode handles and manipulates the activity assessment nodes. More...
Public Member Functions | |
QString | getNodeId () |
Returns the ID of this node. More... | |
QString | getNodeName () |
Returns the name of this node. More... | |
QString | getNodeValue () |
Returns the value of this node. More... | |
TreeNode | getParentNode () |
Returns the parent node of this node. More... | |
int | getChildCount () |
Returns the number of child nodes for this node. More... | |
ActivityCheckType | getCheckType () |
Returns the checktype of this node. More... | |
TreeNode | getChildNodeAt (int) |
Returns the child node at the specified index of this node. More... | |
TreeNode | getChildNodeBy (QString) |
Returns the child node with the specified ID of this node. More... | |
TreeNode | getCheckOnlyTree () |
Returns a tree with only half or full checktype nodes. More... | |
QString | getIncorrectFeedback () |
Returns the incorrect feedback of this node. More... | |
void | setIncorrectFeedback (QString) |
Sets the incorrect feedback for this node. More... | |
int | getLeafCount () |
Returns the total number of leaf nodes for this node. More... | |
int | getCheckLeafCount () |
Returns the number of full checktype leaf nodes. More... | |
int | getTotalLeafPoints () |
Returns the total points of leaf nodes. More... | |
bool | isVariableEnabled () |
Returns true if this node is variable enabled, otherwise false. More... | |
QString | getVariableName () |
Returns the variable name of this node. More... | |
QString | getVariableToString () |
Returns the variable name if the value type of the node is entire range, otherwise the value of this node. More... | |
void | setCheck (bool) |
Checks or unchecks this node. More... | |
ComparatorClass | getComparatorClass () |
Returns the comparator class. More... | |
void | setNodeName (QString) |
Sets the node of this node. More... | |
void | setNodeValue (QString) |
Sets the value of this node. More... | |
int | getLeafCountByComponent (QString) |
Returns the number of leaves with the specified component name (includes all children). More... | |
int | getCheckLeafCountByComponent (QString) |
Returns the number of checked leaves with the specified component name (including all children). More... | |
int | getCheckLeafPointsByComponent (QString) |
Returns the total points of checked leaves with the specified component name (including all children). More... | |
int | getTotalLeafPointsByComponent (QString) |
Returns the total points of leaves with the specified component name (including all children). More... | |
int | getCheckLeafPoints () |
Returns the total points of all nodes that have checks, including all children. More... | |
pair< QString, QString > | getCompPointPair () |
Returns the component and points as a pair associated with only this node. There can be many components and points per node. More... | |
void | checkChanged (QString, QString, int) |
This event is emitted when the checktype of a node changes. More... | |
TreeNode | getChildNodeByFullId (QString) |
Returns the child node with the specified full ID of this node. More... | |
TreeNode | addChildNode (ComparatorClass, QString, QString, QString, bool) |
Create a new child node and add it to the tree. More... | |
TreeNode handles and manipulates the activity assessment nodes.
TreeNode TreeNode::addChildNode | ( | ComparatorClass | , |
QString | , | ||
QString | , | ||
QString | , | ||
bool | |||
) |
Create a new child node and add it to the tree.
classType,enum<ComparatorClass> | eCompClass_Ip = 0, eCompClass_Routing = 1, eCompClass_Acl = 2, eCompClass_Nat = 3, eCompClass_Physical = 4, eCompClass_Switching = 5, eCompClass_Connectivity = 6, eCompClass_Logical = 7, eCompClass_All = 8, eCompClass_Encircling_Head = 9, eCompClass_Encircling_Sub = 10 |
nodeName,the | name of the node. |
nodeId,the | id of the node. |
nodeValue,the | value of the node. |
bVariableEnabled,bool-true | if variable is enabled and false if it's not on this node |
void TreeNode::checkChanged | ( | QString | , |
QString | , | ||
int | |||
) |
This event is emitted when the checktype of a node changes.
IPC event.
int TreeNode::getCheckLeafCount | ( | ) |
Returns the number of full checktype leaf nodes.
int TreeNode::getCheckLeafCountByComponent | ( | QString | ) |
Returns the number of checked leaves with the specified component name (including all children).
component,the | name of the component of interest. |
int TreeNode::getCheckLeafPoints | ( | ) |
Returns the total points of all nodes that have checks, including all children.
int TreeNode::getCheckLeafPointsByComponent | ( | QString | ) |
Returns the total points of checked leaves with the specified component name (including all children).
component,the | name of the component of interest. |
TreeNode TreeNode::getCheckOnlyTree | ( | ) |
ActivityCheckType TreeNode::getCheckType | ( | ) |
Returns the checktype of this node.
int TreeNode::getChildCount | ( | ) |
Returns the number of child nodes for this node.
TreeNode TreeNode::getChildNodeAt | ( | int | ) |
Returns the child node at the specified index of this node.
index,the | index of the child node of interest. |
TreeNode TreeNode::getChildNodeBy | ( | QString | ) |
Returns the child node with the specified ID of this node.
ID,the | ID of the child node of interest. |
TreeNode TreeNode::getChildNodeByFullId | ( | QString | ) |
Returns the child node with the specified full ID of this node.
ID,the | full ID of the child node of interest. |
ComparatorClass TreeNode::getComparatorClass | ( | ) |
Returns the comparator class.
pair< QString, QString > TreeNode::getCompPointPair | ( | ) |
Returns the component and points as a pair associated with only this node. There can be many components and points per node.
QString TreeNode::getIncorrectFeedback | ( | ) |
Returns the incorrect feedback of this node.
int TreeNode::getLeafCount | ( | ) |
Returns the total number of leaf nodes for this node.
int TreeNode::getLeafCountByComponent | ( | QString | ) |
Returns the number of leaves with the specified component name (includes all children).
component,the | name of the component of interest. |
QString TreeNode::getNodeId | ( | ) |
Returns the ID of this node.
QString TreeNode::getNodeName | ( | ) |
Returns the name of this node.
QString TreeNode::getNodeValue | ( | ) |
Returns the value of this node.
TreeNode TreeNode::getParentNode | ( | ) |
int TreeNode::getTotalLeafPoints | ( | ) |
Returns the total points of leaf nodes.
int TreeNode::getTotalLeafPointsByComponent | ( | QString | ) |
Returns the total points of leaves with the specified component name (including all children).
component,the | name of the component of interest. |
QString TreeNode::getVariableName | ( | ) |
Returns the variable name of this node.
QString TreeNode::getVariableToString | ( | ) |
Returns the variable name if the value type of the node is entire range, otherwise the value of this node.
bool TreeNode::isVariableEnabled | ( | ) |
Returns true if this node is variable enabled, otherwise false.
void TreeNode::setCheck | ( | bool | ) |
Checks or unchecks this node.
bCheck,true | to check this node, false to uncheck it. |
void TreeNode::setIncorrectFeedback | ( | QString | ) |
Sets the incorrect feedback for this node.
feedbackStr,the | incorrect feedback for this node. |
void TreeNode::setNodeName | ( | QString | ) |
Sets the node of this node.
name,the | node of this node. |
void TreeNode::setNodeValue | ( | QString | ) |
Sets the value of this node.
value,the | value of this node. |