1 -- Created on: 1993-08-12
2 -- Created by: Frederic MAUPAS
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class MakeHeader from APIHeaderSection
19 ---Purpose : This class allows to consult and prepare/edit data stored in
20 -- a Step Model Header
24 StepModel from StepData,
25 Protocol from Interface,
26 FileName from HeaderSection,
27 FileSchema from HeaderSection,
28 FileDescription from HeaderSection,
29 Integer from Standard,
30 Boolean from Standard,
31 HAsciiString from TCollection,
32 HArray1OfHAsciiString from Interface
34 -- raises NotDone from StdFail
38 Create(shapetype : Integer = 0) returns MakeHeader;
39 ---Purpose : Prepares a new MakeHeader from scratch
41 Create(model : StepModel) returns MakeHeader;
42 ---Purpose : Prepares a MakeHeader from the content of a StepModel
43 -- See IsDone to know if the Header is well defined
45 Init (me : in out; nameval : CString);
46 ---Purpose : Cancels the former definition and gives a FileName
47 -- To be used when a Model has no well defined Header
49 IsDone(me) returns Boolean;
50 ---Purpose : Returns True if all data have been defined (see also
51 -- HasFn, HasFs, HasFd)
53 Apply (me; model : mutable StepModel);
54 ---Purpose : Creates an empty header for a new
55 -- STEP model and allows the header fields to be completed.
58 NewModel (me; protocol : Protocol from Interface) returns StepModel;
59 ---Purpose : Builds a Header, creates a new StepModel, then applies the
60 -- Header to the StepModel
61 -- The Schema Name is taken from the Protocol (if it inherits
62 -- from StepData, else it is left in blanks)
64 --- Specific Methods for FileName Entity
66 HasFn (me) returns Boolean;
67 ---Purpose: Checks whether there is a
68 -- file_name entity. Returns True if there is one.
70 FnValue (me) returns FileName from HeaderSection;
71 ---Purpose: Returns the file_name entity.
72 -- Returns an empty entity if the file_name entity is not initialized.
74 SetName(me : in out; aName : HAsciiString);
76 Name (me) returns HAsciiString;
77 ---Purpose: Returns the name attribute for the file_name entity.
78 SetTimeStamp(me : in out; aTimeStamp : HAsciiString);
79 TimeStamp (me) returns HAsciiString;
80 --- Purpose: Returns the value of the time_stamp attribute for the file_name entity.
81 SetAuthor(me : in out; aAuthor : HArray1OfHAsciiString);
82 SetAuthorValue(me : in out; num : Integer; aAuthor : HAsciiString);
83 Author (me) returns HArray1OfHAsciiString;
84 AuthorValue (me; num : Integer) returns HAsciiString;
85 ---Purpose: Returns the value of the name attribute for the file_name entity.
87 NbAuthor (me) returns Integer;
88 ---Purpose: Returns the number of values for the author attribute in the file_name entity.
90 SetOrganization(me : in out;
91 aOrganization : HArray1OfHAsciiString);
92 SetOrganizationValue(me : in out; num : Integer;
93 aOrganization : HAsciiString);
94 Organization (me) returns HArray1OfHAsciiString;
95 OrganizationValue (me; num : Integer) returns HAsciiString;
96 --- Purpose: Returns the value of attribute
97 -- organization for the file_name entity.
99 NbOrganization (me) returns Integer;
100 --- Purpose: Returns the number of values for
101 -- the organization attribute in the file_name entity.
103 SetPreprocessorVersion(me : in out;
104 aPreprocessorVersion : HAsciiString);
105 PreprocessorVersion (me) returns HAsciiString;
106 ---Purpose: Returns the name of the preprocessor_version for the file_name entity.
108 SetOriginatingSystem(me : in out; aOriginatingSystem : HAsciiString);
109 OriginatingSystem (me) returns HAsciiString;
110 SetAuthorisation(me : in out; aAuthorisation : HAsciiString);
111 Authorisation (me) returns HAsciiString;
112 ---Purpose: Returns the value of the authorization attribute for the file_name entity.
114 HasFs (me) returns Boolean;
115 ---Purpose: Checks whether there is a file_schema entity. Returns True if there is one.
117 FsValue (me) returns FileSchema from HeaderSection;
118 ---Purpose: Returns the file_schema entity. Returns an empty entity if the file_schema entity is not initialized.
120 SetSchemaIdentifiers(me : in out; aSchemaIdentifiers :
121 mutable HArray1OfHAsciiString);
122 SetSchemaIdentifiersValue(me : in out; num : Integer;
123 aSchemaIdentifier : HAsciiString);
124 SchemaIdentifiers (me) returns HArray1OfHAsciiString;
125 SchemaIdentifiersValue (me; num : Integer) returns HAsciiString;
126 --- Purpose: Returns the value of the schema_identifier attribute for the file_schema entity.
128 NbSchemaIdentifiers (me) returns Integer;
129 ---Purpose: Returns the number of values for the schema_identifier attribute in the file_schema entity.
131 AddSchemaIdentifier (me: in out; aSchemaIdentifier : HAsciiString);
132 ---Purpose: Add a subname of schema (if not yet in the list)
134 --- Specific Methods for FileDescription Entity
136 HasFd (me) returns Boolean;
137 --- Purpose: Checks whether there is a file_description entity. Returns True if there is one.
139 FdValue (me) returns FileDescription from HeaderSection;
140 ---Purpose: Returns the file_description
141 -- entity. Returns an empty entity if the file_description entity is not initialized.
143 SetDescription(me : in out;
144 aDescription : HArray1OfHAsciiString);
145 SetDescriptionValue(me : in out; num : Integer;
146 aDescription : HAsciiString);
147 Description (me) returns HArray1OfHAsciiString;
148 DescriptionValue (me; num : Integer) returns HAsciiString;
149 --- Purpose: Returns the value of the
150 -- description attribute for the file_description entity.
152 NbDescription (me) returns Integer;
153 --- Purpose: Returns the number of values for
154 -- the file_description entity in the STEP file header.
156 SetImplementationLevel(me : in out;
157 aImplementationLevel : HAsciiString);
158 ImplementationLevel (me) returns HAsciiString;
159 ---Purpose: Returns the value of the
160 -- implementation_level attribute for the file_description entity.
167 fd : FileDescription;