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