4.2.3 Object Hierarchy: The Root Object and the Project

As a result of loading the "xor.proj" file, we created a number of objects, all of which can be thought of as organized into a hierarchical tree, with Root at the top of the tree. The Root window is associated with the Root object, which is a generic object that basically just serves as a place holder for other objects. We opened the XOR project in Root, and so an object representing the entire XOR project has been created as a child of Root. The Project window is associated with this project; in fact we could create a second project under root, and if we did a second project window would be created. Typically, though, we just have one project. Within this project, we have both a network and an environment, as well as some other things we will consider later in this tutorial. Within the network we have layers of units; within the units we have projections from other layers, which contain connections.

Each object can be identified by a string that specifies its location in the object hierarchy. Root sits at the top of the object hierarchy; our project is a 'child' of root. It's identifier string is .projects[0]. In general, the identifier string for an object specifies its location in the object hierarchy as a pathway specification that begins with a '.', followed by fields separated by dots. Each field contains a type-name and an index. One can trace the pathway to a particular object down from Root (implicit in the first dot) through intermediate fields separated by dots, ending with the field specifying the type and token number of the object itself. The path for the project is short since it is the first (and only) project that is a child of Root. This is all exactly like a directory hierarchy, except we have objects instead of files and the separator is '.' instead of '/'.

Objects can have proper names as well as type names and indices; these names can be used to access the object directly and to give it a mnemonic label that can be used in referring to it. The windows you see give the full identifier string and if a name has been assigned, they give the name as well in parentheses.

Within the Project window, we have several menus accessible. As before, one of these menus refers to the Project Object itself (the Object menu). The other menus refer to the children of the project, which are again organized into several types. The main ones we will care about are the networks, the environments, the processes, and the logs. The defaults, specs, and scripts are for customizations that we will not consider for the moment. We could access the network through the .networks menu, but we already have a window up on the screen that gives us access to the network, called the NetView.