0024428: Implementation of LGPL license
[occt.git] / src / APIHeaderSection / APIHeaderSection_MakeHeader.cdl
CommitLineData
b311480e 1-- Created on: 1993-08-12
2-- Created by: Frederic MAUPAS
3-- Copyright (c) 1993-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
17class MakeHeader from APIHeaderSection
18
19 ---Purpose : This class allows to consult and prepare/edit data stored in
20 -- a Step Model Header
21
22 uses
23
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
33
34-- raises NotDone from StdFail
35
36 is
37
38 Create(shapetype : Integer = 0) returns MakeHeader;
39 ---Purpose : Prepares a new MakeHeader from scratch
40
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
44
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
48
49 IsDone(me) returns Boolean;
50 ---Purpose : Returns True if all data have been defined (see also
51 -- HasFn, HasFs, HasFd)
52
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.
56
57
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)
63
64 --- Specific Methods for FileName Entity
65
66 HasFn (me) returns Boolean;
67 ---Purpose: Checks whether there is a
68 -- file_name entity. Returns True if there is one.
69
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.
73
74 SetName(me : in out; aName : HAsciiString);
75
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.
86
87 NbAuthor (me) returns Integer;
88 ---Purpose: Returns the number of values for the author attribute in the file_name entity.
89
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.
98
99 NbOrganization (me) returns Integer;
100 --- Purpose: Returns the number of values for
101 -- the organization attribute in the file_name entity.
102
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.
107
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.
113
114 HasFs (me) returns Boolean;
115 ---Purpose: Checks whether there is a file_schema entity. Returns True if there is one.
116
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.
119
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.
127
128 NbSchemaIdentifiers (me) returns Integer;
129 ---Purpose: Returns the number of values for the schema_identifier attribute in the file_schema entity.
130
131 AddSchemaIdentifier (me: in out; aSchemaIdentifier : HAsciiString);
132 ---Purpose: Add a subname of schema (if not yet in the list)
133
134 --- Specific Methods for FileDescription Entity
135
136 HasFd (me) returns Boolean;
137 --- Purpose: Checks whether there is a file_description entity. Returns True if there is one.
138
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.
142
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.
151
152 NbDescription (me) returns Integer;
153 --- Purpose: Returns the number of values for
154 -- the file_description entity in the STEP file header.
155
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.
161
162 fields
163
164 done : Boolean;
165 fn : FileName;
166 fs : FileSchema;
167 fd : FileDescription;
168
169end MakeHeader;