0022807: Loading of STEP entities in model during reading of STEP file requires redun...
[occt.git] / src / StepData / StepData_StepModel.cdl
1 -- File:        StepModel.cdl
2 -- Created:     Tue Feb 11 16:01:53 1992
3 -- Author:      Christian CAILLET
4 --              <cky@phobox>
5 ---Copyright:    Matra Datavision 1992
6
7
8 class StepModel  from StepData  inherits InterfaceModel
9
10     ---Purpose : Gives access to
11     -- - entities in a STEP file,
12     -- - the STEP file header.
13
14 uses Type, HAsciiString from TCollection,
15      Messenger from Message,
16      HArray1OfInteger from TColStd,
17      EntityList, EntityIterator, Check
18
19 raises NoSuchObject
20
21 is
22
23     Create returns mutable StepModel;
24     ---Purpose: Creates an empty STEP model with an empty header.
25     
26     Entity (me; num : Integer) returns Transient;
27     ---Purpose : returns entity given its rank.
28     --           Same as InterfaceEntity, but with a shorter name
29
30     GetFromAnother (me : mutable; other : InterfaceModel);
31     ---Purpose : gets header from another Model (uses Header Protocol)
32
33     NewEmptyModel (me) returns mutable InterfaceModel;
34     ---Purpose : Returns a New Empty Model, same type as <me>, i.e. StepModel
35
36         -- --   Header management   -- --
37
38     Header (me) returns EntityIterator;
39     ---Purpose : returns Header entities under the form of an iterator
40
41     HasHeaderEntity(me; atype : any Type) returns Boolean;
42     ---Purpose : says if a Header entity has a specifed type
43
44     HeaderEntity (me; atype : any Type) returns mutable Transient
45     ---Purpose : Returns Header entity with specified type, if there is
46         raises NoSuchObject;
47     --           Error if no Header Entity matches <atype>
48
49     ClearHeader (me : mutable);
50     ---Purpose : Clears the Header
51
52     AddHeaderEntity (me : mutable; ent : mutable Transient);
53     ---Purpose : Adds an Entity to the Header
54
55     VerifyCheck (me; ach : in out Check) is redefined;
56     ---Purpose : Specific Check, checks Header Items with HeaderProtocol
57
58     DumpHeader (me; S : Messenger from Message; level : Integer = 0);
59     ---Purpose : Dumps the Header, with the Header Protocol of StepData.
60     --           If the Header Protocol is not defined, for each Header Entity,
61     --           prints its Type. Else sends the Header under the form of
62     --           HEADER Section of an Ascii Step File
63     --           <level> is not used because Header is not so big
64
65
66     ClearLabels (me : mutable);
67     ---Purpose : erases specific labels, i.e. clears the map (entity-ident)
68
69     SetIdentLabel (me : mutable; ent : Transient; ident : Integer);
70     ---Purpose : Attaches an ident to an entity to produce a label
71     --           (does nothing if <ent> is not in <me>)
72
73     IdentLabel (me; ent : Transient) returns Integer;
74     ---Purpose : returns the label ident attached to an entity, 0 if not in me
75
76     PrintLabel (me; ent : Transient; S : Messenger from Message);
77     ---Purpose : Prints label specific to STEP norm for a given entity, i.e.
78     --           if a LabelIdent has been recorded, its value with '#', else
79     --           the number in the model with '#' and between ()
80
81     StringLabel (me; ent : Transient) returns HAsciiString from TCollection;
82     ---Purpose : Returns a string with the label attached to a given entity,
83     --           same form as for PrintLabel
84
85 fields
86
87     theheader : EntityList;
88     theidnums : HArray1OfInteger from TColStd;
89
90 end StepModel;