The tgraph marker Object

The marker operation on tgraph storage objects returns a tgraph marker object. This page describes the operations supported by these Tcl objects. An object oriented style of programming is supported where the object returned from $storage marker is used as the command name and the specific operation being invoked is the first argument.

The following operations on tgraph marker objects are supported:
 
   
$marker kind Returns "marker". This operation can be used to determine the kind of tgraph object stored in the Tcl variable marker.
$marker name Returns the name of the e4Graph marker represented by marker.
$marker storage Returns the tgraph object representing the e4Graph storage containing the e4Graph marker denoted by marker.
$marker node Returns the tgraph node object representing the e4Graph node marked by the marker denoted by marker.
$marker setnode node Modifies the e4Graph marker denoted by marker to subsequently mark the e4Graph node represented by node. marker and node must belong  in the same e4Graph storage.
$marker delete Deletes the e4Graph marker represented by marker, and if the node marked by the deleted marker becomes unreachable, then that node and any unreachable parts of the storage are also deleted.
$marker dispose Disposes of the Tcl command for marker. After this, the value of marker can no longer be used as a Tcl command. The underlying e4Graph marker still exists in its persistent storage. This command can be used to free up the memory associated with the Tcl command without deleting the marker from its persistent storage. The marker can be retrieved and subsequently used again as a Tcl command, through one of the tgraph operations that return markers (e.g. $storage marker).
$marker isvalid Returns 1 if the e4Graph marker denoted by marker is valid (it has not been deleted and its tgraph storage object has not been closed), or 0 if it is invalid.
$marker id Returns an identifier for the marker that's the value of marker. This identifier is unique within the storage containing the marker. Subsequently you can give this value to $storage get marker $id and retrieve the marker.
$marker userdata ?newvalue? Sets or retrieves the user data (an integer) that is persistently associated with this marker. The Tcl binding will in the future use this field to store additional type information for tgraph objects; the existence of this method is documented here for completeness only.
   

Here is an example showing how a tgraph marker object can be used to manipulate the underlying e4Graph marker object:

set mystorage [tgraph::open foo.db]
set mymarker [$mystorage marker m1]
if {$mystorage == [$mymarker storage]} {
    puts "one and the same!"
}
set mynode [$mymarker node]
puts "$mymarker name == [$mymarker name]"
...
$mystorage close