1 -- File: IGESData_IGESDumper.cdl
2 -- Created: Mon Sep 6 14:50:24 1993
3 -- Author: Christian CAILLET
5 ---Copyright: Matra Datavision 1993
8 class IGESDumper from IGESData
10 ---Purpose : Provides a way to obtain a clear Dump of an IGESEntity
11 -- (distinct from normalized output). It works with tools
12 -- attached to Entities, as for normalized Reade and Write
14 -- For each Entity, displaying data is splitted in own data
15 -- (specific to each type) and other attached data, which are
16 -- defined for all IGES Types (either from "Directory Entry" or
17 -- from Lists of Associativities and Properties)
19 uses Messenger from Message, Protocol from IGESData, IGESModel, IGESEntity, SpecificLib
25 Create (model : IGESModel; protocol : Protocol from IGESData)
27 ---Purpose : Returns an IGESDumper ready to work. The IGESModel provides
28 -- the numbering of Entities : as for any InterfaceModel, it
29 -- gives each Entity a number; but for IGESEntities, the "Number
30 -- of Directory Entry" according to the definition of IGES Files,
33 PrintDNum (me; ent : IGESEntity; S : Messenger from Message)
34 ---Purpose : Prints onto an output, the "Number of Directory Entry" which
35 -- corresponds to an IGESEntity in the IGESModel, under the form
36 -- "D#nnn" (a Null Handle gives D#0)
37 raises InterfaceError;
38 -- Error if <ent> is not contained in the IGESModel
40 PrintShort (me; ent : IGESEntity; S : Messenger from Message)
41 ---Purpose : Prints onto an output, the "Number of Directory Entry" (see
42 -- PrintDNum) plus IGES Type and Form Numbers, which gives
43 -- "D#nnn Type nnn Form nnn"
44 raises InterfaceError;
45 -- Error if <ent> is not contained in the IGESModel
47 Dump (me; ent : IGESEntity; S : Messenger from Message;
48 own : Integer; attached : Integer = -1)
49 -- <own> commands level for proper data :
50 -- 0 : Only DNum (PrintDNum)
51 -- 1 : DNum with IGES Type and Form N0s (PrintShort) & Type Name
52 -- 2 : idem plus (if defined) DNum of Transf and of View, and
53 -- (if defined) ShortLabel and Subscript Number
54 -- 3 : idem plus (if defined) Value of Transf, DNum or Value of
55 -- other Directory Data (Color, etc...)
56 -- 4 and over : idem plus calls method OwnDump
58 -- When Implementing OwnDump, Please use this convention :
59 -- Anyway, give true complete IGES Name for Entity
60 -- 4 : proper values as store in the fields of the Entity,
61 -- abbreviated if list is very long ...
62 -- 5 : idem but complete display of fields (even if long)
63 -- 6 : data under a comprehensive form if necessary, especially
64 -- taking in account Transf (e.g. for a Circle : give in 3D
65 -- Center, Radius, Axis ...)
66 -- In addition, for referenced Entities, simply display them by
67 -- call to PrintDNum above
69 -- <attached> commands level for Properties and Associativities
70 -- with same signification as <own>, except for value 0 :
71 -- if <own> = 0 or 1, these lists are NOT printed at all
72 -- if <own> = 2, for each attached entity, call to PrintDNum
73 -- if <own> over 2, for each attached entity, call to PrintShort
74 -- (DNum with Type and Form numbers)
75 -- In addition, -1 inhibits output (only DNum are printed)
76 raises InterfaceError;
77 -- Error if <ent> is not contained in the IGESModel
78 -- Remark : if <ent> is Null, the message "(Null)" is displayed
81 OwnDump (me; ent : IGESEntity; S : Messenger from Message; own : Integer);
82 ---Purpose : Specific Dump for each IGES Entity, call by Dump (just above)
83 -- <own> is the parameter <own> from Dump