Geomview Manual - References

Go to the first, previous, next, last section, table of contents.

### Embedded objects and external-object references

Some object types (`LIST`, `INST`) allow references to other OOGL objects, which may appear literally in the data stream, be loaded from named disk files, or be communicated from elsewhere via named objects. Gcl commands also accept geometry in these forms.

The general syntax is

     <oogl-object>  ::=
    	[ "{" ]
    	    [ "define" symbolname ]
    	    [ "appearance" appearance ]
    	    [ ["="] object-keyword ...
    		 | "<" filename
    		 | ":" symbolname ]
    	[ "}" ]

where "quoted" items are literal strings (which appear without the quotes), [bracketed] items are optional, and | denotes alternatives. Curly braces, when present, must match; the outermost set of curly braces is generally required when the object is in a larger context, e.g. when it is part of a larger object or embedded in a Geomview command stream.

For example, each of the following three lines:

    	{ define fred   QUAD 1 0 0  0 0 1  0 1 0  1 0 0 }

    	{ appearance { +edge } LIST { < "file1" } { : fred } }

    	VECT 1 2 0   2 0   0 0 0   1 1 2

is a valid OOGL object. The last example is only valid when it is delimited unambiguously by residing in its own disk file.

The "<" construct causes a disk file to be read. Note that this isn't a general textual "include" mechanism; a complete OOGL object must appear in the referenced file.

Files read using "<" are sought first in the directory of the file which referred to them, if any; failing that, the normal search path (set by Geomview's `load-path` command) is used. The default search looks first in the current directory, then in the Geomview data directories.

The ":" construct allows references to symbols, created with `define`. A symbol's initial value is a null object. When a symbol is (re)defined, all references to it are automatically changed; this is a crucial part of the support for interprocess communication. Some future version of the documentation should explain this better...

Again, white space and line breaks are insignificant, and "#" comments may appear anywhere.

Go to the first, previous, next, last section, table of contents.