0024023: Revamp the OCCT Handle -- ambiguity
[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--
d5f74e42 8-- This library is free software; you can redistribute it and/or modify it under
9-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 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
6e33d3ce 53 Apply (me; model : StepModel);
7fd59977 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
6e33d3ce 120 SetSchemaIdentifiers(me : in out; aSchemaIdentifiers : HArray1OfHAsciiString);
7fd59977 121 SetSchemaIdentifiersValue(me : in out; num : Integer;
122 aSchemaIdentifier : HAsciiString);
123 SchemaIdentifiers (me) returns HArray1OfHAsciiString;
124 SchemaIdentifiersValue (me; num : Integer) returns HAsciiString;
125 --- Purpose: Returns the value of the schema_identifier attribute for the file_schema entity.
126
127 NbSchemaIdentifiers (me) returns Integer;
128 ---Purpose: Returns the number of values for the schema_identifier attribute in the file_schema entity.
129
130 AddSchemaIdentifier (me: in out; aSchemaIdentifier : HAsciiString);
131 ---Purpose: Add a subname of schema (if not yet in the list)
132
133 --- Specific Methods for FileDescription Entity
134
135 HasFd (me) returns Boolean;
136 --- Purpose: Checks whether there is a file_description entity. Returns True if there is one.
137
138 FdValue (me) returns FileDescription from HeaderSection;
139 ---Purpose: Returns the file_description
140 -- entity. Returns an empty entity if the file_description entity is not initialized.
141
142 SetDescription(me : in out;
143 aDescription : HArray1OfHAsciiString);
144 SetDescriptionValue(me : in out; num : Integer;
145 aDescription : HAsciiString);
146 Description (me) returns HArray1OfHAsciiString;
147 DescriptionValue (me; num : Integer) returns HAsciiString;
148 --- Purpose: Returns the value of the
149 -- description attribute for the file_description entity.
150
151 NbDescription (me) returns Integer;
152 --- Purpose: Returns the number of values for
153 -- the file_description entity in the STEP file header.
154
155 SetImplementationLevel(me : in out;
156 aImplementationLevel : HAsciiString);
157 ImplementationLevel (me) returns HAsciiString;
158 ---Purpose: Returns the value of the
159 -- implementation_level attribute for the file_description entity.
160
161 fields
162
163 done : Boolean;
164 fn : FileName;
165 fs : FileSchema;
166 fd : FileDescription;
167
168end MakeHeader;