class type ['node]
extension = object
.. end
The
extension
is, as the name says, the extensible part of the
nodes. See
Intro_extensions
for an introduction into extensions.
method clone : < clone : 'a; node : 'node; set_node : 'node -> unit; .. > as 'a
clone
is called when the node is to be duplicated, and as a
followup action, also the extension must be cloned. This method
must return a deep copy of the extension. By convention, the
caller of this method must also invoke set_node
on the copied
extension to establish a new link to a main node.
method node : 'node
node
is the link from the extension to the main node.
Conventionally, this link is set by the node via set_node
below after the extension has been created or cloned.
method set_node : 'node -> unit
set_node n
sets the link to the main node to n
. The link is
returned by node
after that.