| Applying science to business management |
  
Node Class Structure
Nodes are maintained in a hierarchical structure with four
predefined classes (Primitive, Model, Unit, and User) and any
number of additional temporary classes all connected in a
tree-like network. The following diagram illustrates how this
structure is organized.
The Primitive class contains all primitives. The Model class
contains the root nodes for all library models that have been
automatically loaded. The Unit class contains all user-defined
units of measure. And, the User class contains all nodes created
by the user. This structure is used to isolate nodes so that no
unwanted interaction occurs.
When a command is being executed at any class level, DScript
first looks in the current class for all nodes it needs to
evaluate the command. If a required node is not found, the
parent's class level is searched, and then the parent's parent's
class level, and so on until all required nodes are found.
For example, if you use PI in a command at the User
level, the software will first search the User class, then the
Unit class, then the Model class, and finally the Primitive class
before it will find a node named PI. If, however, you had
created a node named PI in the User level, this version of
PI would be the first found and the one applied in the
current command.
In this case, library models still use the primitive
definition for PI. Commands executed at the Model level
know nothing about any nodes residing in the User level.
Similarly, commands executing in the User level know nothing
about any nodes in the LibraryModel1, LibraryModel2, and other
dynamically-created model levels. But, User class commands can
access the root nodes of any library model because the root is
located in the Model class.
Temporary class levels are created by evaluating an expression
within braces { }. Nodes created in a temporary class are
visible only to expressions also evaluated within the braces.
Also, these nodes are deleted when the end brace is encountered.
To execute a command in a particular class, use the primitive, model,
unit, or user
primitives.
|