1 -- File: Vrml_Instancing.cdl
2 -- Created: Wed Feb 5 13:22:06 1997
3 -- Author: Alexander BRIVIN
4 -- <brivin@minox.nnov.matra-dtv.fr>
5 ---Copyright: Matra Datavision 1997
8 class Instancing from Vrml
10 ---Purpose: defines "instancing" - using the same instance of a node
12 -- It is accomplished by using the "DEF" and "USE" keywords.
13 -- The DEF keyword both defines a named node, and creates a single
15 -- The USE keyword indicates that the most recently defined instance
16 -- should be used again.
17 -- If several nades were given the same name, then the last DEF
18 -- encountered during parsing "wins".
19 -- DEF/USE is limited to a single file.
22 AsciiString from TCollection
26 Create ( aString : AsciiString from TCollection )
27 returns Instancing from Vrml;
29 ---Purpose: Adds "DEF <myName>" in anOStream (VRML file).
30 DEF ( me; anOStream: in out OStream from Standard) returns OStream from Standard;
33 ---Purpose: Adds "USE <myName>" in anOStream (VRML file).
34 USE ( me; anOStream: in out OStream from Standard) returns OStream from Standard;
39 myName : AsciiString from TCollection; -- Name using DEF/USE for a node