|
RTC Toolkit 6.0.0
|
This represents a tree node in the repository tree model that also contains cached data. More...
Classes | |
| class | _MetaData |
| Internal helper class to hold mutable metadata fields for the tree node. More... | |
| class | DataState |
| The state a tree node's data item can be in. More... | |
Public Member Functions | |
| __init__ (self, DataPointPath path, bool is_leaf=False, bool mark_cached=False, bool mark_ready=False, bool mark_requested=False) | |
| str | short_name (self) |
| Returns the last component of the datapoint path. | |
| bool | is_root (self) |
| Returns True if this is the root node of the tree and False otherwise. | |
| bool | is_leaf (self) |
| Returns True if this is a leaf node of the tree, i.e. | |
| bool | can_fetch_more (self) |
| Returns True if any of the data items are stale and not yet requested, otherwise False is returned. | |
| set_value (self, Any value, bool mark_cached=False) | |
| Sets the datapoint value of the tree node and marks the value as ready, i.e. | |
| set_metadata (self, Any metadata, bool mark_cached=False) | |
| Sets the datapoint metadata of the tree node and marks the metadata as ready, i.e. | |
| add_child (self, TreeNode child) | |
| Adds a child tree node and marks this node as the parent. | |
| insert_child (self, int position, TreeNode child) | |
| Inserts a child tree node into a particular position and marks this node as the parent. | |
| remove_child (self, TreeNode child) | |
| Removes a child tree node from this node and resets the child's parent pointer. | |
| Sequence[TreeNode] | remove_children (self, int position, int count) |
| Removes multiple child tree nodes from this node and resets the removed children's parent pointers. | |
| str | __str__ (self) |
Public Attributes | |
| path = path | |
| old_path = None | |
| parent = None | |
| list[TreeNode] | children = None if is_leaf else [] |
| value = None | |
| metadata = TreeNode._MetaData(None) | |
| children_state = TreeNode.DataState.READY | |
| value_state = TreeNode.DataState.CACHED | |
| metadata_state = TreeNode.DataState.CACHED | |
This represents a tree node in the repository tree model that also contains cached data.
Leaf nodes represent datapoints in the repository, while non-leaf nodes represent folders in the datapoint hierarchy.
| gui.repository_model.TreeNode.__init__ | ( | self, | |
| DataPointPath | path, | ||
| bool | is_leaf = False, | ||
| bool | mark_cached = False, | ||
| bool | mark_ready = False, | ||
| bool | mark_requested = False ) |
| str gui.repository_model.TreeNode.__str__ | ( | self | ) |
| gui.repository_model.TreeNode.add_child | ( | self, | |
| TreeNode | child ) |
Adds a child tree node and marks this node as the parent.
| bool gui.repository_model.TreeNode.can_fetch_more | ( | self | ) |
Returns True if any of the data items are stale and not yet requested, otherwise False is returned.
| gui.repository_model.TreeNode.insert_child | ( | self, | |
| int | position, | ||
| TreeNode | child ) |
Inserts a child tree node into a particular position and marks this node as the parent.
| bool gui.repository_model.TreeNode.is_leaf | ( | self | ) |
Returns True if this is a leaf node of the tree, i.e.
corresponds to an actual datapoint value, and False otherwise.
| bool gui.repository_model.TreeNode.is_root | ( | self | ) |
Returns True if this is the root node of the tree and False otherwise.
| gui.repository_model.TreeNode.remove_child | ( | self, | |
| TreeNode | child ) |
Removes a child tree node from this node and resets the child's parent pointer.
| Sequence[TreeNode] gui.repository_model.TreeNode.remove_children | ( | self, | |
| int | position, | ||
| int | count ) |
Removes multiple child tree nodes from this node and resets the removed children's parent pointers.
The removed nodes are returned.
| gui.repository_model.TreeNode.set_metadata | ( | self, | |
| Any | metadata, | ||
| bool | mark_cached = False ) |
Sets the datapoint metadata of the tree node and marks the metadata as ready, i.e.
not stale.
| gui.repository_model.TreeNode.set_value | ( | self, | |
| Any | value, | ||
| bool | mark_cached = False ) |
Sets the datapoint value of the tree node and marks the value as ready, i.e.
not stale.
| str gui.repository_model.TreeNode.short_name | ( | self | ) |
Returns the last component of the datapoint path.
| gui.repository_model.TreeNode.children_state = TreeNode.DataState.READY |
| gui.repository_model.TreeNode.metadata = TreeNode._MetaData(None) |
| gui.repository_model.TreeNode.metadata_state = TreeNode.DataState.CACHED |
| gui.repository_model.TreeNode.old_path = None |
| gui.repository_model.TreeNode.parent = None |
| gui.repository_model.TreeNode.path = path |
| gui.repository_model.TreeNode.value = None |
| gui.repository_model.TreeNode.value_state = TreeNode.DataState.CACHED |