0023024: Update headers of OCCT files
[occt.git] / src / APIHeaderSection / APIHeaderSection_MakeHeader.cdl
1 -- Created on: 1993-08-12
2 -- Created by: Frederic MAUPAS
3 -- Copyright (c) 1993-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
21
22
23 class MakeHeader from APIHeaderSection
24    
25     ---Purpose : This class allows to consult and prepare/edit  data stored in
26     --           a Step Model  Header
27
28    uses
29     
30         StepModel             from StepData,
31         Protocol              from Interface,
32         FileName              from HeaderSection,
33         FileSchema            from HeaderSection,
34         FileDescription       from HeaderSection,
35         Integer               from Standard,
36         Boolean               from Standard,
37         HAsciiString          from TCollection,
38         HArray1OfHAsciiString from Interface
39    
40 --   raises  NotDone               from StdFail
41         
42    is
43    
44        Create(shapetype : Integer = 0) returns MakeHeader;
45        ---Purpose : Prepares a new MakeHeader from scratch
46
47        Create(model : StepModel) returns MakeHeader;
48        ---Purpose : Prepares a MakeHeader from the content of a StepModel
49        --           See IsDone to know if the Header is well defined
50
51        Init (me : in out; nameval : CString);
52        ---Purpose : Cancels the former definition and gives a FileName
53        --           To be used when a Model has no well defined Header
54
55        IsDone(me) returns Boolean;
56        ---Purpose : Returns True if all data have been defined (see also
57        --           HasFn, HasFs, HasFd)
58
59        Apply (me; model : mutable StepModel);
60        ---Purpose : Creates an empty header for a new
61        --           STEP model and allows the header fields to be completed.
62
63
64        NewModel (me; protocol : Protocol from Interface) returns StepModel;
65        ---Purpose : Builds a Header, creates a new StepModel, then applies the
66        --           Header to the StepModel
67        --           The Schema Name is taken from the Protocol (if it inherits
68        --           from StepData, else it is left in blanks)
69
70        --- Specific Methods for FileName Entity
71
72        HasFn (me) returns Boolean;
73        ---Purpose: Checks whether there is a
74        --          file_name entity. Returns True if there is one.    
75     
76        FnValue (me) returns FileName from HeaderSection;
77        ---Purpose: Returns the file_name entity.
78        --          Returns an empty entity if the file_name entity is not initialized.                   
79
80        SetName(me : in out; aName : HAsciiString);
81     
82        Name (me) returns HAsciiString;
83        ---Purpose: Returns the name attribute for the file_name entity.    
84        SetTimeStamp(me : in out; aTimeStamp : HAsciiString);
85        TimeStamp (me) returns HAsciiString;
86        --- Purpose: Returns the value of the time_stamp attribute for the file_name entity.   
87        SetAuthor(me : in out; aAuthor : HArray1OfHAsciiString);
88        SetAuthorValue(me : in out; num : Integer; aAuthor : HAsciiString);
89        Author (me) returns HArray1OfHAsciiString;
90        AuthorValue (me; num : Integer) returns HAsciiString;
91        ---Purpose: Returns the value of the name attribute for the file_name entity.    
92     
93        NbAuthor (me) returns Integer;
94        ---Purpose: Returns the number of values for the author attribute in the file_name entity.    
95     
96        SetOrganization(me : in out; 
97                        aOrganization : HArray1OfHAsciiString);
98        SetOrganizationValue(me : in out; num : Integer;
99                        aOrganization : HAsciiString);
100        Organization (me) returns HArray1OfHAsciiString;
101        OrganizationValue (me; num : Integer) returns HAsciiString;
102        --- Purpose: Returns the value of attribute
103        -- organization for the file_name entity.
104     
105        NbOrganization (me) returns Integer;
106        --- Purpose: Returns the number of values for
107        -- the organization attribute in the file_name entity.   
108     
109        SetPreprocessorVersion(me : in out; 
110                               aPreprocessorVersion : HAsciiString);
111        PreprocessorVersion (me) returns HAsciiString;
112        ---Purpose: Returns the name of the preprocessor_version for the file_name entity.    
113     
114        SetOriginatingSystem(me : in out; aOriginatingSystem : HAsciiString);
115        OriginatingSystem (me) returns HAsciiString;
116        SetAuthorisation(me : in out; aAuthorisation : HAsciiString);
117        Authorisation (me) returns HAsciiString;
118        ---Purpose: Returns the value of the authorization attribute for the file_name entity.
119
120        HasFs (me) returns Boolean;
121        ---Purpose: Checks whether there is a file_schema entity. Returns True if there is one.    
122     
123        FsValue (me) returns FileSchema from HeaderSection;
124        ---Purpose: Returns the file_schema entity. Returns an empty entity if the file_schema entity is not initialized.
125
126        SetSchemaIdentifiers(me : in out; aSchemaIdentifiers : 
127                                  mutable HArray1OfHAsciiString);
128        SetSchemaIdentifiersValue(me : in out; num : Integer;
129                        aSchemaIdentifier : HAsciiString);
130        SchemaIdentifiers (me) returns HArray1OfHAsciiString;
131        SchemaIdentifiersValue (me; num : Integer) returns HAsciiString;
132        --- Purpose: Returns the value of the schema_identifier attribute for the file_schema entity.
133         
134        NbSchemaIdentifiers (me) returns Integer;
135        ---Purpose: Returns the number of values for the schema_identifier attribute in the file_schema entity.    
136     
137        AddSchemaIdentifier (me: in out; aSchemaIdentifier : HAsciiString);
138        ---Purpose: Add a subname of schema (if not yet in the list)
139
140        --- Specific Methods for FileDescription Entity
141
142        HasFd (me) returns Boolean;
143        --- Purpose: Checks whether there is a file_description entity. Returns True if there is one.   
144     
145        FdValue (me) returns FileDescription from HeaderSection;
146        ---Purpose: Returns the file_description
147        -- entity. Returns an empty entity if the file_description entity is not initialized.
148         
149        SetDescription(me : in out;
150                       aDescription : HArray1OfHAsciiString);
151        SetDescriptionValue(me : in out; num : Integer;
152                        aDescription : HAsciiString);
153        Description (me) returns HArray1OfHAsciiString;
154        DescriptionValue (me; num : Integer) returns HAsciiString;
155        --- Purpose: Returns the value of the
156        -- description attribute for the file_description entity.
157     
158        NbDescription (me) returns Integer;
159        --- Purpose: Returns the number of values for
160        -- the file_description entity in the STEP file header.  
161     
162        SetImplementationLevel(me : in out; 
163                               aImplementationLevel : HAsciiString);
164        ImplementationLevel (me) returns HAsciiString;
165        ---Purpose: Returns the value of the
166        -- implementation_level attribute for the file_description entity.
167     
168    fields
169
170         done : Boolean;
171         fn   : FileName; 
172         fs   : FileSchema;
173         fd   : FileDescription;
174
175 end MakeHeader;