Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/IGESData_GlobalSection.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Created on: 1992-04-06
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1992-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _IGESData_GlobalSection_HeaderFile
0018 #define _IGESData_GlobalSection_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Integer.hxx>
0025 #include <Standard_Real.hxx>
0026 #include <Standard_Boolean.hxx>
0027 class TCollection_HAsciiString;
0028 class Interface_ParamSet;
0029 class Interface_Check;
0030 class gp_XYZ;
0031 
0032 //! Description of a global section (corresponds to file header)
0033 //! used as well in IGESModel, IGESReader and IGESWriter
0034 //! Warning : From IGES-5.1, a parameter is added : LastChangeDate (concerns
0035 //! transferred set of data, not the file itself)
0036 //! Of course, it can be absent if read from earlier versions
0037 //! (a default is then to be set to current date)
0038 //! From 5.3, one more : ApplicationProtocol (optional)
0039 class IGESData_GlobalSection
0040 {
0041 public:
0042   DEFINE_STANDARD_ALLOC
0043 
0044   //! Creates an empty GlobalSection, ready to be filled,
0045   //! Warning : No default value is provided
0046   Standard_EXPORT IGESData_GlobalSection();
0047 
0048   //! Fills GlobalSection from a ParamSet (i.e. taken from file)
0049   //! undefined parameters do not change default values when defined
0050   //! Fills Check about Corrections or Fails
0051   Standard_EXPORT void Init(const occ::handle<Interface_ParamSet>& params,
0052                             occ::handle<Interface_Check>&          ach);
0053 
0054   //! Copies data referenced by Handle (that is, Strings)
0055   //! useful to "isolate" a GlobalSection after copy by "="
0056   //! (from a Model to another Model for instance)
0057   Standard_EXPORT void CopyRefs();
0058 
0059   //! Returns all contained data in the form of a ParamSet
0060   //! Remark : Strings are given under Hollerith form
0061   Standard_EXPORT occ::handle<Interface_ParamSet> Params() const;
0062 
0063   //! Returns a string withpout its Hollerith marks (nnnH ahead).
0064   //! Remark : all strings stored in GlobalSection are expurged
0065   //! from Hollerith information (without nnnH)
0066   //! If <astr> is not Hollerith form, it is simply copied
0067   Standard_EXPORT occ::handle<TCollection_HAsciiString> TranslatedFromHollerith(
0068     const occ::handle<TCollection_HAsciiString>& astr) const;
0069 
0070   //! Returns the parameter delimiter character.
0071   Standard_EXPORT char Separator() const;
0072 
0073   //! Returns the record delimiter character.
0074   Standard_EXPORT char EndMark() const;
0075 
0076   //! Returns the name of the sending system.
0077   Standard_EXPORT occ::handle<TCollection_HAsciiString> SendName() const;
0078 
0079   //! Returns the name of the IGES file.
0080   Standard_EXPORT occ::handle<TCollection_HAsciiString> FileName() const;
0081 
0082   //! Returns the Native System ID of the system that created the IGES file.
0083   Standard_EXPORT occ::handle<TCollection_HAsciiString> SystemId() const;
0084 
0085   //! Returns the name of the pre-processor used to write the IGES file.
0086   Standard_EXPORT occ::handle<TCollection_HAsciiString> InterfaceVersion() const;
0087 
0088   //! Returns the number of binary bits for integer representations.
0089   Standard_EXPORT int IntegerBits() const;
0090 
0091   //! Returns the maximum power of a decimal representation of a
0092   //! single-precision floating point number in the sending system.
0093   Standard_EXPORT int MaxPower10Single() const;
0094 
0095   Standard_EXPORT int MaxDigitsSingle() const;
0096 
0097   //! Returns the maximum power of a decimal representation of a
0098   //! double-precision floating point number in the sending system.
0099   Standard_EXPORT int MaxPower10Double() const;
0100 
0101   Standard_EXPORT int MaxDigitsDouble() const;
0102 
0103   //! Returns the name of the receiving system.
0104   Standard_EXPORT occ::handle<TCollection_HAsciiString> ReceiveName() const;
0105 
0106   //! Returns the scale used in the IGES file.
0107   Standard_EXPORT double Scale() const;
0108 
0109   //! Returns the system length unit
0110   Standard_EXPORT double CascadeUnit() const;
0111 
0112   //! Returns the unit flag that was used to write the IGES file.
0113   Standard_EXPORT int UnitFlag() const;
0114 
0115   //! Returns the name of the unit the IGES file was written in.
0116   Standard_EXPORT occ::handle<TCollection_HAsciiString> UnitName() const;
0117 
0118   //! Returns the maximum number of line weight gradations.
0119   Standard_EXPORT int LineWeightGrad() const;
0120 
0121   //! Returns the of maximum line weight width in IGES file units.
0122   Standard_EXPORT double MaxLineWeight() const;
0123 
0124   //! Returns the IGES file creation date.
0125   Standard_EXPORT occ::handle<TCollection_HAsciiString> Date() const;
0126 
0127   //! Returns the resolution used in the IGES file.
0128   Standard_EXPORT double Resolution() const;
0129 
0130   //! Returns the approximate maximum coordinate value found in the model.
0131   Standard_EXPORT double MaxCoord() const;
0132 
0133   //! Returns True if the approximate maximum coordinate value found in
0134   //! the model is greater than 0.
0135   Standard_EXPORT bool HasMaxCoord() const;
0136 
0137   //! Returns the name of the IGES file author.
0138   Standard_EXPORT occ::handle<TCollection_HAsciiString> AuthorName() const;
0139 
0140   //! Returns the name of the company where the IGES file was written.
0141   Standard_EXPORT occ::handle<TCollection_HAsciiString> CompanyName() const;
0142 
0143   //! Returns the IGES version that the IGES file was written in.
0144   Standard_EXPORT int IGESVersion() const;
0145 
0146   Standard_EXPORT int DraftingStandard() const;
0147 
0148   //! Returns the date and time when the model was created or last
0149   //! modified (for IGES 5.1 and later).
0150   Standard_EXPORT occ::handle<TCollection_HAsciiString> LastChangeDate() const;
0151 
0152   //! Returns True if the date and time when the model was created or
0153   //! last modified are specified, i.e. not defaulted to NULL.
0154   Standard_EXPORT bool HasLastChangeDate() const;
0155 
0156   Standard_EXPORT void SetLastChangeDate();
0157 
0158   Standard_EXPORT occ::handle<TCollection_HAsciiString> ApplicationProtocol() const;
0159 
0160   Standard_EXPORT bool HasApplicationProtocol() const;
0161 
0162   //! Returns a string built from year,
0163   //! month, day, hour, minute and second values. The form of the
0164   //! resulting string is defined as follows:
0165   //! -      -1: YYMMDD.HHNNSS,
0166   //! -       0: YYYYMMDD.HHNNSS,
0167   //! -       1: YYYY-MM-DD:HH-NN-SS, where:
0168   //! - YYYY or YY is 4 or 2 digit year,
0169   //! - HH is hour (00-23),
0170   //! - MM is month (01-12),
0171   //! - NN is minute (00-59)
0172   //! - DD is day (01-31),
0173   //! - SS is second (00-59).
0174   Standard_EXPORT static occ::handle<TCollection_HAsciiString> NewDateString(const int year,
0175                                                                              const int month,
0176                                                                              const int day,
0177                                                                              const int hour,
0178                                                                              const int minut,
0179                                                                              const int second,
0180                                                                              const int mode = -1);
0181 
0182   //! Converts the string given in the
0183   //! form YYMMDD.HHNNSS or YYYYMMDD.HHNNSS to either
0184   //! YYMMDD.HHNNSS, YYYYMMDD.HHNNSS or YYYY-MM-DD:HH-NN-SS.
0185   Standard_EXPORT static occ::handle<TCollection_HAsciiString> NewDateString(
0186     const occ::handle<TCollection_HAsciiString>& date,
0187     const int                                    mode = 1);
0188 
0189   //! Returns the unit value (in
0190   //! meters) that the IGES file was written in.
0191   Standard_EXPORT double UnitValue() const;
0192 
0193   Standard_EXPORT void SetSeparator(const char val);
0194 
0195   Standard_EXPORT void SetEndMark(const char val);
0196 
0197   Standard_EXPORT void SetSendName(const occ::handle<TCollection_HAsciiString>& val);
0198 
0199   Standard_EXPORT void SetFileName(const occ::handle<TCollection_HAsciiString>& val);
0200 
0201   Standard_EXPORT void SetSystemId(const occ::handle<TCollection_HAsciiString>& val);
0202 
0203   Standard_EXPORT void SetInterfaceVersion(const occ::handle<TCollection_HAsciiString>& val);
0204 
0205   Standard_EXPORT void SetIntegerBits(const int val);
0206 
0207   Standard_EXPORT void SetMaxPower10Single(const int val);
0208 
0209   Standard_EXPORT void SetMaxDigitsSingle(const int val);
0210 
0211   Standard_EXPORT void SetMaxPower10Double(const int val);
0212 
0213   Standard_EXPORT void SetMaxDigitsDouble(const int val);
0214 
0215   Standard_EXPORT void SetReceiveName(const occ::handle<TCollection_HAsciiString>& val);
0216 
0217   Standard_EXPORT void SetCascadeUnit(const double theUnit);
0218 
0219   Standard_EXPORT void SetScale(const double val);
0220 
0221   Standard_EXPORT void SetUnitFlag(const int val);
0222 
0223   Standard_EXPORT void SetUnitName(const occ::handle<TCollection_HAsciiString>& val);
0224 
0225   Standard_EXPORT void SetLineWeightGrad(const int val);
0226 
0227   Standard_EXPORT void SetMaxLineWeight(const double val);
0228 
0229   Standard_EXPORT void SetDate(const occ::handle<TCollection_HAsciiString>& val);
0230 
0231   Standard_EXPORT void SetResolution(const double val);
0232 
0233   Standard_EXPORT void SetMaxCoord(const double val = 0.0);
0234 
0235   Standard_EXPORT void MaxMaxCoord(const double val = 0.0);
0236 
0237   Standard_EXPORT void MaxMaxCoords(const gp_XYZ& xyz);
0238 
0239   Standard_EXPORT void SetAuthorName(const occ::handle<TCollection_HAsciiString>& val);
0240 
0241   Standard_EXPORT void SetCompanyName(const occ::handle<TCollection_HAsciiString>& val);
0242 
0243   Standard_EXPORT void SetIGESVersion(const int val);
0244 
0245   Standard_EXPORT void SetDraftingStandard(const int val);
0246 
0247   Standard_EXPORT void SetLastChangeDate(const occ::handle<TCollection_HAsciiString>& val);
0248 
0249   Standard_EXPORT void SetApplicationProtocol(const occ::handle<TCollection_HAsciiString>& val);
0250 
0251 private:
0252   char                                  theSeparator;
0253   char                                  theEndMark;
0254   occ::handle<TCollection_HAsciiString> theSendName;
0255   occ::handle<TCollection_HAsciiString> theFileName;
0256   occ::handle<TCollection_HAsciiString> theSystemId;
0257   occ::handle<TCollection_HAsciiString> theInterfaceVersion;
0258   int                                   theIntegerBits;
0259   int                                   theMaxPower10Single;
0260   int                                   theMaxDigitsSingle;
0261   int                                   theMaxPower10Double;
0262   int                                   theMaxDigitsDouble;
0263   occ::handle<TCollection_HAsciiString> theReceiveName;
0264   double                                theScale;
0265   double                                theCascadeUnit;
0266   int                                   theUnitFlag;
0267   occ::handle<TCollection_HAsciiString> theUnitName;
0268   int                                   theLineWeightGrad;
0269   double                                theMaxLineWeight;
0270   occ::handle<TCollection_HAsciiString> theDate;
0271   double                                theResolution;
0272   double                                theMaxCoord;
0273   bool                                  hasMaxCoord;
0274   occ::handle<TCollection_HAsciiString> theAuthorName;
0275   occ::handle<TCollection_HAsciiString> theCompanyName;
0276   int                                   theIGESVersion;
0277   int                                   theDraftingStandard;
0278   occ::handle<TCollection_HAsciiString> theLastChangeDate;
0279   occ::handle<TCollection_HAsciiString> theAppliProtocol;
0280 };
0281 
0282 #endif // _IGESData_GlobalSection_HeaderFile