RTC Toolkit 6.1.0-pre1
Loading...
Searching...
No Matches
gui.node.symlink_node.SymlinkNode Class Reference

A node representing a symbolic link in a tree. More...

Inheritance diagram for gui.node.symlink_node.SymlinkNode:

Public Member Functions

 __init__ (self, DataPointPath path, DataPointPath links_to, TreeNode|None linked_node=None)
 
 get_value (self)
 Get the value from the linked node if the symlink is not dangling.
 
 set_value (self, Any new_value, *args, **kwargs)
 Set the value of the linked node if the symlink is not dangling.
 
dict get_metadata (self, bool except_internals=False)
 Returns metadata of linked node with extra entry called symlink_target.
 
 set_metadata (self, dict new_metadata, *args, **kwargs)
 Set metadata on the linked node, excluding 'symlink_target'.
 
 update_metadata (self, str key, value, *args, **kwargs)
 Update metadata on the linked node.
 
 set_linked_node (self, TreeNode|None node, bool mark_cached=False)
 Set the node referenced by this symlink and optionally mark the link as cached.
 
bool is_leaf (self)
 Symlink is always leaf.
 
 can_fetch_more (self)
 Return whether more data can be fetched from the linked node if the symlink is not dangling.
 
bool is_requested (self)
 Return whether the linked node has a pending request if the symlink is not dangling.
 
 mark_ready (self)
 Sets symlink to a READY state.
 
bool is_dangling (self)
 Return whether the symlink has no linked node.
 
str __str__ (self)
 

Public Attributes

 links_to = links_to
 
 linked_node = None
 
 link_state = NodeDataState.READY
 

Detailed Description

A node representing a symbolic link in a tree.

This node does not hold data. It contains only a linked TreeNode and uses the methods of the linked node to work with data and metadata. If the linked node does not exist, the symbolic link is dangling.

Constructor & Destructor Documentation

◆ __init__()

gui.node.symlink_node.SymlinkNode.__init__ ( self,
DataPointPath path,
DataPointPath links_to,
TreeNode | None linked_node = None )

Member Function Documentation

◆ __str__()

str gui.node.symlink_node.SymlinkNode.__str__ ( self)

◆ can_fetch_more()

gui.node.symlink_node.SymlinkNode.can_fetch_more ( self)

Return whether more data can be fetched from the linked node if the symlink is not dangling.

◆ get_metadata()

dict gui.node.symlink_node.SymlinkNode.get_metadata ( self,
bool except_internals = False )

Returns metadata of linked node with extra entry called symlink_target.

If the symlink is danling, returns only dictionary with symlink_target.

◆ get_value()

gui.node.symlink_node.SymlinkNode.get_value ( self)

Get the value from the linked node if the symlink is not dangling.

◆ is_dangling()

bool gui.node.symlink_node.SymlinkNode.is_dangling ( self)

Return whether the symlink has no linked node.

◆ is_leaf()

bool gui.node.symlink_node.SymlinkNode.is_leaf ( self)

Symlink is always leaf.

◆ is_requested()

bool gui.node.symlink_node.SymlinkNode.is_requested ( self)

Return whether the linked node has a pending request if the symlink is not dangling.

◆ mark_ready()

gui.node.symlink_node.SymlinkNode.mark_ready ( self)

Sets symlink to a READY state.

◆ set_linked_node()

gui.node.symlink_node.SymlinkNode.set_linked_node ( self,
TreeNode | None node,
bool mark_cached = False )

Set the node referenced by this symlink and optionally mark the link as cached.

◆ set_metadata()

gui.node.symlink_node.SymlinkNode.set_metadata ( self,
dict new_metadata,
* args,
** kwargs )

Set metadata on the linked node, excluding 'symlink_target'.

Has no effect if the symlink is dangling.

◆ set_value()

gui.node.symlink_node.SymlinkNode.set_value ( self,
Any new_value,
* args,
** kwargs )

Set the value of the linked node if the symlink is not dangling.

◆ update_metadata()

gui.node.symlink_node.SymlinkNode.update_metadata ( self,
str key,
value,
* args,
** kwargs )

Update metadata on the linked node.

'symlink_target' is excluded. Has no effect if the symlink is dangling.

Member Data Documentation

◆ link_state

gui.node.symlink_node.SymlinkNode.link_state = NodeDataState.READY

◆ linked_node

gui.node.symlink_node.SymlinkNode.linked_node = None

◆ links_to

gui.node.symlink_node.SymlinkNode.links_to = links_to

The documentation for this class was generated from the following file: