Documentation
This type is used in the implementation of a doubly-linked list and by itself provides a doubly-linked ring. The nodes can be traversed in both directions from the head of the list to the tail, and back. The most useful characteristic of this component is that it can be added to an existing type to provide list functionality to the type. The way to do that, is to assign the containing object to the __ when creating the dnode object. This allows access back from the object included in a larger type to the containing type.
Objects of type dnode have no value, and it is an error to try to get or set this value.
| Property | Type | Description |
|---|---|---|
| _ | type(*) | This property is provided for use by the user to attach any object of any type to the type in which this property is provided. |
| __ | type(*) | This property is provided for use by the user to attach any object of any type to the type in which this property is provided. It has the additional feature of being marked with the resolve keyword, so that object resolution can continue down this property. |
| next | dnode |
This holds a reference to either the next dnode in the list, or
else to .nul.
|
| prev | dnode |
This holds a reference to either the previous dnode in the list,
or else to .nul.
|
| type | type | Specifies the dnode type object. |
Inserts the calling node after the node passed as the parameter in the target
ring or list. If the calling node is part of a ring of multiple nodes
then the whole ring is added with the ring being broken between the
calling node and the node pointed to by its
next. If, for example, there are two rings of
nodes: a, b, c (, a, b, …) and d,
e, f (, d, e, …). If the call:
b.insertafter(e) is made, then the result will be:
d, e, c, a, b, f (, d, e, c, …).
Inserts the calling node before the node passed as the parameter in the target
ring or list. If the calling node is part of a ring of multiple nodes
then the whole ring is added with the ring being broken between the
calling node and the node pointed to by its
prev. If, for example, there are two rings of
nodes: a, b, c (, a, b, …) and d,
e, f (, d, e, …). If the call:
b.insertbefore(e) is made, then the result will
be: d, c, a, b, e, f (, d, c, a, …).
This removes one or more nodes from a chain of nodes. If no parameter is passed, it removes only the calling node. If another node in the same chain is passed, then all nodes between the node passed as the parameter and the calling node will be removed into a separate ring.



