b311480e |
1 | -- Created on: 1992-02-11 |
2 | -- Created by: Christian CAILLET |
3 | -- Copyright (c) 1992-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
6 | -- The content of this file is subject to the Open CASCADE Technology Public |
7 | -- License Version 6.5 (the "License"). You may not use the content of this file |
8 | -- except in compliance with the License. Please obtain a copy of the License |
9 | -- at http://www.opencascade.org and read it completely before using this file. |
10 | -- |
11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | -- |
14 | -- The Original Code and all software distributed under the License is |
15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | -- Initial Developer hereby disclaims all such warranties, including without |
17 | -- limitation, any warranties of merchantability, fitness for a particular |
18 | -- purpose or non-infringement. Please see the License for the specific terms |
19 | -- and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | |
22 | |
23 | class StepModel from StepData inherits InterfaceModel |
24 | |
25 | ---Purpose : Gives access to |
26 | -- - entities in a STEP file, |
27 | -- - the STEP file header. |
28 | |
29 | uses Type, HAsciiString from TCollection, |
30 | Messenger from Message, |
bc650d41 |
31 | HArray1OfInteger from TColStd, |
7fd59977 |
32 | EntityList, EntityIterator, Check |
33 | |
34 | raises NoSuchObject |
35 | |
36 | is |
37 | |
38 | Create returns mutable StepModel; |
39 | ---Purpose: Creates an empty STEP model with an empty header. |
bc650d41 |
40 | |
7fd59977 |
41 | Entity (me; num : Integer) returns Transient; |
42 | ---Purpose : returns entity given its rank. |
43 | -- Same as InterfaceEntity, but with a shorter name |
44 | |
45 | GetFromAnother (me : mutable; other : InterfaceModel); |
46 | ---Purpose : gets header from another Model (uses Header Protocol) |
47 | |
48 | NewEmptyModel (me) returns mutable InterfaceModel; |
49 | ---Purpose : Returns a New Empty Model, same type as <me>, i.e. StepModel |
50 | |
51 | -- -- Header management -- -- |
52 | |
53 | Header (me) returns EntityIterator; |
54 | ---Purpose : returns Header entities under the form of an iterator |
55 | |
56 | HasHeaderEntity(me; atype : any Type) returns Boolean; |
57 | ---Purpose : says if a Header entity has a specifed type |
58 | |
59 | HeaderEntity (me; atype : any Type) returns mutable Transient |
60 | ---Purpose : Returns Header entity with specified type, if there is |
61 | raises NoSuchObject; |
62 | -- Error if no Header Entity matches <atype> |
63 | |
64 | ClearHeader (me : mutable); |
65 | ---Purpose : Clears the Header |
66 | |
67 | AddHeaderEntity (me : mutable; ent : mutable Transient); |
68 | ---Purpose : Adds an Entity to the Header |
69 | |
70 | VerifyCheck (me; ach : in out Check) is redefined; |
71 | ---Purpose : Specific Check, checks Header Items with HeaderProtocol |
72 | |
73 | DumpHeader (me; S : Messenger from Message; level : Integer = 0); |
74 | ---Purpose : Dumps the Header, with the Header Protocol of StepData. |
75 | -- If the Header Protocol is not defined, for each Header Entity, |
76 | -- prints its Type. Else sends the Header under the form of |
77 | -- HEADER Section of an Ascii Step File |
78 | -- <level> is not used because Header is not so big |
79 | |
80 | |
81 | ClearLabels (me : mutable); |
82 | ---Purpose : erases specific labels, i.e. clears the map (entity-ident) |
83 | |
84 | SetIdentLabel (me : mutable; ent : Transient; ident : Integer); |
85 | ---Purpose : Attaches an ident to an entity to produce a label |
86 | -- (does nothing if <ent> is not in <me>) |
87 | |
88 | IdentLabel (me; ent : Transient) returns Integer; |
89 | ---Purpose : returns the label ident attached to an entity, 0 if not in me |
90 | |
91 | PrintLabel (me; ent : Transient; S : Messenger from Message); |
92 | ---Purpose : Prints label specific to STEP norm for a given entity, i.e. |
93 | -- if a LabelIdent has been recorded, its value with '#', else |
94 | -- the number in the model with '#' and between () |
95 | |
96 | StringLabel (me; ent : Transient) returns HAsciiString from TCollection; |
97 | ---Purpose : Returns a string with the label attached to a given entity, |
98 | -- same form as for PrintLabel |
99 | |
100 | fields |
101 | |
102 | theheader : EntityList; |
bc650d41 |
103 | theidnums : HArray1OfInteger from TColStd; |
7fd59977 |
104 | |
105 | end StepModel; |