0030556: Coding - IGESData_GlobalSection missing member initialization in default...
[occt.git] / src / IGESData / IGESData_GlobalSection.hxx
CommitLineData
42cf5bc1 1// Created on: 1992-04-06
2// Created by: Christian CAILLET
3// Copyright (c) 1992-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
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
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _IGESData_GlobalSection_HeaderFile
18#define _IGESData_GlobalSection_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Character.hxx>
25#include <Standard_Integer.hxx>
26#include <Standard_Real.hxx>
27#include <Standard_Boolean.hxx>
28class TCollection_HAsciiString;
29class Interface_ParamSet;
30class Interface_Check;
31class gp_XYZ;
32
33
34//! Description of a global section (corresponds to file header)
35//! used as well in IGESModel, IGESReader and IGESWriter
36//! Warning : From IGES-5.1, a parameter is added : LastChangeDate (concerns
37//! transferred set of data, not the file itself)
38//! Of course, it can be absent if read from earlier versions
39//! (a default is then to be set to current date)
40//! From 5.3, one more : ApplicationProtocol (optional)
41class IGESData_GlobalSection
42{
43public:
44
45 DEFINE_STANDARD_ALLOC
46
42cf5bc1 47 //! Creates an empty GlobalSection, ready to be filled,
48 //! Warning : No default value is provided
49 Standard_EXPORT IGESData_GlobalSection();
50
51 //! Fills GlobalSection from a ParamSet (i.e. taken from file)
52 //! undefined parameters do not change default values when defined
53 //! Fills Check about Corrections or Fails
54 Standard_EXPORT void Init (const Handle(Interface_ParamSet)& params, Handle(Interface_Check)& ach);
55
56 //! Copies data referenced by Handle (that is, Strings)
57 //! usefull to "isolate" a GlobalSection after copy by "="
58 //! (from a Model to another Model for instance)
59 Standard_EXPORT void CopyRefs();
60
61 //! Returns all contained data in the form of a ParamSet
62 //! Remark : Strings are given under Hollerith form
63 Standard_EXPORT Handle(Interface_ParamSet) Params() const;
64
65 //! Returns a string withpout its Hollerith marks (nnnH ahead).
66 //! Remark : all strings stored in GlobalSection are expurged
67 //! from Hollerith informations (without nnnH)
68 //! If <astr> is not Hollerith form, it is simply copied
69 Standard_EXPORT Handle(TCollection_HAsciiString) TranslatedFromHollerith (const Handle(TCollection_HAsciiString)& astr) const;
70
71 //! Returns the parameter delimiter character.
72 Standard_EXPORT Standard_Character Separator() const;
73
74 //! Returns the record delimiter character.
75 Standard_EXPORT Standard_Character EndMark() const;
76
77 //! Returns the name of the sending system.
78 Standard_EXPORT Handle(TCollection_HAsciiString) SendName() const;
79
80 //! Returns the name of the IGES file.
81 Standard_EXPORT Handle(TCollection_HAsciiString) FileName() const;
82
83 //! Returns the Native System ID of the system that created the IGES file.
84 Standard_EXPORT Handle(TCollection_HAsciiString) SystemId() const;
85
86 //! Returns the name of the pre-processor used to write the IGES file.
87 Standard_EXPORT Handle(TCollection_HAsciiString) InterfaceVersion() const;
88
89 //! Returns the number of binary bits for integer representations.
90 Standard_EXPORT Standard_Integer IntegerBits() const;
91
92 //! Returns the maximum power of a decimal representation of a
93 //! single-precision floating point number in the sending system.
94 Standard_EXPORT Standard_Integer MaxPower10Single() const;
95
96 Standard_EXPORT Standard_Integer MaxDigitsSingle() const;
97
98 //! Returns the maximum power of a decimal representation of a
99 //! double-precision floating point number in the sending system.
100 Standard_EXPORT Standard_Integer MaxPower10Double() const;
101
102 Standard_EXPORT Standard_Integer MaxDigitsDouble() const;
103
104 //! Returns the name of the receiving system.
105 Standard_EXPORT Handle(TCollection_HAsciiString) ReceiveName() const;
106
107 //! Returns the scale used in the IGES file.
108 Standard_EXPORT Standard_Real Scale() const;
109
110 //! Returns the unit flag that was used to write the IGES file.
111 Standard_EXPORT Standard_Integer UnitFlag() const;
112
113 //! Returns the name of the unit the IGES file was written in.
114 Standard_EXPORT Handle(TCollection_HAsciiString) UnitName() const;
115
116 //! Returns the maximum number of line weight gradations.
117 Standard_EXPORT Standard_Integer LineWeightGrad() const;
118
119 //! Returns the of maximum line weight width in IGES file units.
120 Standard_EXPORT Standard_Real MaxLineWeight() const;
121
122 //! Returns the IGES file creation date.
123 Standard_EXPORT Handle(TCollection_HAsciiString) Date() const;
124
125 //! Returns the resolution used in the IGES file.
126 Standard_EXPORT Standard_Real Resolution() const;
127
128 //! Returns the approximate maximum coordinate value found in the model.
129 Standard_EXPORT Standard_Real MaxCoord() const;
130
131 //! Returns True if the approximate maximum coordinate value found in
132 //! the model is greater than 0.
133 Standard_EXPORT Standard_Boolean HasMaxCoord() const;
134
135 //! Returns the name of the IGES file author.
136 Standard_EXPORT Handle(TCollection_HAsciiString) AuthorName() const;
137
138 //! Returns the name of the company where the IGES file was written.
139 Standard_EXPORT Handle(TCollection_HAsciiString) CompanyName() const;
140
141 //! Returns the IGES version that the IGES file was written in.
142 Standard_EXPORT Standard_Integer IGESVersion() const;
143
144 Standard_EXPORT Standard_Integer DraftingStandard() const;
145
146 //! Returns the date and time when the model was created or last
147 //! modified (for IGES 5.1 and later).
148 Standard_EXPORT Handle(TCollection_HAsciiString) LastChangeDate() const;
149
150 //! Returns True if the date and time when the model was created or
151 //! last modified are specified, i.e. not defaulted to NULL.
152 Standard_EXPORT Standard_Boolean HasLastChangeDate() const;
153
154 Standard_EXPORT void SetLastChangeDate();
155
156 Standard_EXPORT Handle(TCollection_HAsciiString) ApplicationProtocol() const;
157
158 Standard_EXPORT Standard_Boolean HasApplicationProtocol() const;
159
160 //! Returns a string built from year,
161 //! month, day, hour, minute and second values. The form of the
162 //! resulting string is defined as follows:
163 //! - -1: YYMMDD.HHNNSS,
164 //! - 0: YYYYMMDD.HHNNSS,
165 //! - 1: YYYY-MM-DD:HH-NN-SS, where:
166 //! - YYYY or YY is 4 or 2 digit year,
167 //! - HH is hour (00-23),
168 //! - MM is month (01-12),
169 //! - NN is minute (00-59)
170 //! - DD is day (01-31),
171 //! - SS is second (00-59).
172 Standard_EXPORT static Handle(TCollection_HAsciiString) NewDateString (const Standard_Integer year, const Standard_Integer month, const Standard_Integer day, const Standard_Integer hour, const Standard_Integer minut, const Standard_Integer second, const Standard_Integer mode = -1);
173
174 //! Converts the string given in the
175 //! form YYMMDD.HHNNSS or YYYYMMDD.HHNNSS to either
176 //! YYMMDD.HHNNSS, YYYYMMDD.HHNNSS or YYYY-MM-DD:HH-NN-SS.
177 Standard_EXPORT static Handle(TCollection_HAsciiString) NewDateString (const Handle(TCollection_HAsciiString)& date, const Standard_Integer mode = 1);
178
179 //! Returns the unit value (in
180 //! meters) that the IGES file was written in.
181 Standard_EXPORT Standard_Real UnitValue() const;
182
183 Standard_EXPORT void SetSeparator (const Standard_Character val);
184
185 Standard_EXPORT void SetEndMark (const Standard_Character val);
186
187 Standard_EXPORT void SetSendName (const Handle(TCollection_HAsciiString)& val);
188
189 Standard_EXPORT void SetFileName (const Handle(TCollection_HAsciiString)& val);
190
191 Standard_EXPORT void SetSystemId (const Handle(TCollection_HAsciiString)& val);
192
193 Standard_EXPORT void SetInterfaceVersion (const Handle(TCollection_HAsciiString)& val);
194
195 Standard_EXPORT void SetIntegerBits (const Standard_Integer val);
196
197 Standard_EXPORT void SetMaxPower10Single (const Standard_Integer val);
198
199 Standard_EXPORT void SetMaxDigitsSingle (const Standard_Integer val);
200
201 Standard_EXPORT void SetMaxPower10Double (const Standard_Integer val);
202
203 Standard_EXPORT void SetMaxDigitsDouble (const Standard_Integer val);
204
205 Standard_EXPORT void SetReceiveName (const Handle(TCollection_HAsciiString)& val);
206
207 Standard_EXPORT void SetScale (const Standard_Real val);
208
209 Standard_EXPORT void SetUnitFlag (const Standard_Integer val);
210
211 Standard_EXPORT void SetUnitName (const Handle(TCollection_HAsciiString)& val);
212
213 Standard_EXPORT void SetLineWeightGrad (const Standard_Integer val);
214
215 Standard_EXPORT void SetMaxLineWeight (const Standard_Real val);
216
217 Standard_EXPORT void SetDate (const Handle(TCollection_HAsciiString)& val);
218
219 Standard_EXPORT void SetResolution (const Standard_Real val);
220
221 Standard_EXPORT void SetMaxCoord (const Standard_Real val = 0.0);
222
223 Standard_EXPORT void MaxMaxCoord (const Standard_Real val = 0.0);
224
225 Standard_EXPORT void MaxMaxCoords (const gp_XYZ& xyz);
226
227 Standard_EXPORT void SetAuthorName (const Handle(TCollection_HAsciiString)& val);
228
229 Standard_EXPORT void SetCompanyName (const Handle(TCollection_HAsciiString)& val);
230
231 Standard_EXPORT void SetIGESVersion (const Standard_Integer val);
232
233 Standard_EXPORT void SetDraftingStandard (const Standard_Integer val);
234
235 Standard_EXPORT void SetLastChangeDate (const Handle(TCollection_HAsciiString)& val);
236
237 Standard_EXPORT void SetApplicationProtocol (const Handle(TCollection_HAsciiString)& val);
238
42cf5bc1 239private:
240
42cf5bc1 241 Standard_Character theSeparator;
242 Standard_Character theEndMark;
243 Handle(TCollection_HAsciiString) theSendName;
244 Handle(TCollection_HAsciiString) theFileName;
245 Handle(TCollection_HAsciiString) theSystemId;
246 Handle(TCollection_HAsciiString) theInterfaceVersion;
247 Standard_Integer theIntegerBits;
248 Standard_Integer theMaxPower10Single;
249 Standard_Integer theMaxDigitsSingle;
250 Standard_Integer theMaxPower10Double;
251 Standard_Integer theMaxDigitsDouble;
252 Handle(TCollection_HAsciiString) theReceiveName;
253 Standard_Real theScale;
254 Standard_Integer theUnitFlag;
255 Handle(TCollection_HAsciiString) theUnitName;
256 Standard_Integer theLineWeightGrad;
257 Standard_Real theMaxLineWeight;
258 Handle(TCollection_HAsciiString) theDate;
259 Standard_Real theResolution;
260 Standard_Real theMaxCoord;
261 Standard_Boolean hasMaxCoord;
262 Handle(TCollection_HAsciiString) theAuthorName;
263 Handle(TCollection_HAsciiString) theCompanyName;
264 Standard_Integer theIGESVersion;
265 Standard_Integer theDraftingStandard;
266 Handle(TCollection_HAsciiString) theLastChangeDate;
267 Handle(TCollection_HAsciiString) theAppliProtocol;
268
42cf5bc1 269};
270
42cf5bc1 271#endif // _IGESData_GlobalSection_HeaderFile