node / dnode |
Top Previous Next |
Scripts > Class elements and c++ instructions > Interpreted C++ instructions > node / dnode
Syntax
node <identifier> ; dnode <identifier> ;
Description
The types node and dnode are designating the structure of a tree node. Such a node consists in a first string - the label - to identify the kind of the node and a second string, which contains a value. A special property of nodes is, that they can be combined to a common tree structure.
node and dnode nearly have the same interface and therefore can be used analogously. The difference is discussed below.
According to these properties nodes can be used in the TextTransformer:
The names and relations of the nodes are explained in the glossary.
Node-instances have special properties: they are reference counted pointers. If a node is assigned to a different, a change of the value (or label) of one of these nodes will result in a change of the value (or label) of the other too.
Example.:
node n1("label1", "value1"); node n2("label2", "value2"); n1 = n2; n1.setLabel("label3"); // now as well n1 as n2 have the label "label3" and the value "value2"
A tree exists as long as there exists a reference to one of its nodes.
The node function are listed into the following chapters:
|
This page belongs to the TextTransformer Documentation |
Home Content German |