b311480e |
1 | -- Created on: 1992-02-11 |
2 | -- Created by: Christian CAILLET |
3 | -- Copyright (c) 1992-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
973c2be1 |
8 | -- This library is free software; you can redistribute it and / or modify it |
9 | -- under the terms of the GNU Lesser General Public version 2.1 as published |
10 | -- by the Free Software Foundation, with special exception defined in the file |
11 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class StepModel from StepData inherits InterfaceModel |
18 | |
19 | ---Purpose : Gives access to |
20 | -- - entities in a STEP file, |
21 | -- - the STEP file header. |
22 | |
23 | uses Type, HAsciiString from TCollection, |
24 | Messenger from Message, |
bc650d41 |
25 | HArray1OfInteger from TColStd, |
7fd59977 |
26 | EntityList, EntityIterator, Check |
27 | |
28 | raises NoSuchObject |
29 | |
30 | is |
31 | |
32 | Create returns mutable StepModel; |
33 | ---Purpose: Creates an empty STEP model with an empty header. |
bc650d41 |
34 | |
7fd59977 |
35 | Entity (me; num : Integer) returns Transient; |
36 | ---Purpose : returns entity given its rank. |
37 | -- Same as InterfaceEntity, but with a shorter name |
38 | |
39 | GetFromAnother (me : mutable; other : InterfaceModel); |
40 | ---Purpose : gets header from another Model (uses Header Protocol) |
41 | |
42 | NewEmptyModel (me) returns mutable InterfaceModel; |
43 | ---Purpose : Returns a New Empty Model, same type as <me>, i.e. StepModel |
44 | |
45 | -- -- Header management -- -- |
46 | |
47 | Header (me) returns EntityIterator; |
48 | ---Purpose : returns Header entities under the form of an iterator |
49 | |
50 | HasHeaderEntity(me; atype : any Type) returns Boolean; |
51 | ---Purpose : says if a Header entity has a specifed type |
52 | |
53 | HeaderEntity (me; atype : any Type) returns mutable Transient |
54 | ---Purpose : Returns Header entity with specified type, if there is |
55 | raises NoSuchObject; |
56 | -- Error if no Header Entity matches <atype> |
57 | |
58 | ClearHeader (me : mutable); |
59 | ---Purpose : Clears the Header |
60 | |
61 | AddHeaderEntity (me : mutable; ent : mutable Transient); |
62 | ---Purpose : Adds an Entity to the Header |
63 | |
64 | VerifyCheck (me; ach : in out Check) is redefined; |
65 | ---Purpose : Specific Check, checks Header Items with HeaderProtocol |
66 | |
67 | DumpHeader (me; S : Messenger from Message; level : Integer = 0); |
68 | ---Purpose : Dumps the Header, with the Header Protocol of StepData. |
69 | -- If the Header Protocol is not defined, for each Header Entity, |
70 | -- prints its Type. Else sends the Header under the form of |
71 | -- HEADER Section of an Ascii Step File |
72 | -- <level> is not used because Header is not so big |
73 | |
74 | |
75 | ClearLabels (me : mutable); |
76 | ---Purpose : erases specific labels, i.e. clears the map (entity-ident) |
77 | |
78 | SetIdentLabel (me : mutable; ent : Transient; ident : Integer); |
79 | ---Purpose : Attaches an ident to an entity to produce a label |
80 | -- (does nothing if <ent> is not in <me>) |
81 | |
82 | IdentLabel (me; ent : Transient) returns Integer; |
83 | ---Purpose : returns the label ident attached to an entity, 0 if not in me |
84 | |
85 | PrintLabel (me; ent : Transient; S : Messenger from Message); |
86 | ---Purpose : Prints label specific to STEP norm for a given entity, i.e. |
87 | -- if a LabelIdent has been recorded, its value with '#', else |
88 | -- the number in the model with '#' and between () |
89 | |
90 | StringLabel (me; ent : Transient) returns HAsciiString from TCollection; |
91 | ---Purpose : Returns a string with the label attached to a given entity, |
92 | -- same form as for PrintLabel |
93 | |
94 | fields |
95 | |
96 | theheader : EntityList; |
bc650d41 |
97 | theidnums : HArray1OfInteger from TColStd; |
7fd59977 |
98 | |
99 | end StepModel; |