Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:57

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 
0043   DEFINE_STANDARD_ALLOC
0044 
0045   //! Creates an empty GlobalSection, ready to be filled,
0046   //! Warning : No default value is provided
0047   Standard_EXPORT IGESData_GlobalSection();
0048   
0049   //! Fills GlobalSection from a ParamSet (i.e. taken from file)
0050   //! undefined parameters do not change default values when defined
0051   //! Fills Check about Corrections or Fails
0052   Standard_EXPORT void Init (const Handle(Interface_ParamSet)& params, 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 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 Handle(TCollection_HAsciiString) TranslatedFromHollerith (const Handle(TCollection_HAsciiString)& astr) const;
0068   
0069   //! Returns the parameter delimiter character.
0070   Standard_EXPORT Standard_Character Separator() const;
0071   
0072   //! Returns the record delimiter character.
0073   Standard_EXPORT Standard_Character EndMark() const;
0074   
0075   //! Returns the name of the sending system.
0076   Standard_EXPORT Handle(TCollection_HAsciiString) SendName() const;
0077   
0078   //! Returns the name of the IGES file.
0079   Standard_EXPORT Handle(TCollection_HAsciiString) FileName() const;
0080   
0081   //! Returns the Native System ID of the system that created the IGES file.
0082   Standard_EXPORT Handle(TCollection_HAsciiString) SystemId() const;
0083   
0084   //! Returns the name of the pre-processor used to write the IGES file.
0085   Standard_EXPORT Handle(TCollection_HAsciiString) InterfaceVersion() const;
0086   
0087   //! Returns the number of binary bits for integer representations.
0088   Standard_EXPORT Standard_Integer IntegerBits() const;
0089   
0090   //! Returns the maximum power of a decimal representation of a
0091   //! single-precision floating point number in the sending system.
0092   Standard_EXPORT Standard_Integer MaxPower10Single() const;
0093   
0094   Standard_EXPORT Standard_Integer MaxDigitsSingle() const;
0095   
0096   //! Returns the maximum power of a decimal representation of a
0097   //! double-precision floating point number in the sending system.
0098   Standard_EXPORT Standard_Integer MaxPower10Double() const;
0099   
0100   Standard_EXPORT Standard_Integer MaxDigitsDouble() const;
0101   
0102   //! Returns the name of the receiving system.
0103   Standard_EXPORT Handle(TCollection_HAsciiString) ReceiveName() const;
0104   
0105   //! Returns the scale used in the IGES file.
0106   Standard_EXPORT Standard_Real Scale() const;
0107 
0108   //! Returns the system length unit
0109   Standard_EXPORT Standard_Real CascadeUnit() const;
0110   
0111   //! Returns the unit flag that was used to write the IGES file.
0112   Standard_EXPORT Standard_Integer UnitFlag() const;
0113   
0114   //! Returns the name of the unit the IGES file was written in.
0115   Standard_EXPORT Handle(TCollection_HAsciiString) UnitName() const;
0116   
0117   //! Returns the maximum number of line weight gradations.
0118   Standard_EXPORT Standard_Integer LineWeightGrad() const;
0119   
0120   //! Returns the of maximum line weight width in IGES file units.
0121   Standard_EXPORT Standard_Real MaxLineWeight() const;
0122   
0123   //! Returns the IGES file creation date.
0124   Standard_EXPORT Handle(TCollection_HAsciiString) Date() const;
0125   
0126   //! Returns the resolution used in the IGES file.
0127   Standard_EXPORT Standard_Real Resolution() const;
0128   
0129   //! Returns the approximate maximum coordinate value found in the model.
0130   Standard_EXPORT Standard_Real MaxCoord() const;
0131   
0132   //! Returns True if the approximate maximum coordinate value found in
0133   //! the model is greater than 0.
0134   Standard_EXPORT Standard_Boolean HasMaxCoord() const;
0135   
0136   //! Returns the name of the IGES file author.
0137   Standard_EXPORT Handle(TCollection_HAsciiString) AuthorName() const;
0138   
0139   //! Returns the name of the company where the IGES file was written.
0140   Standard_EXPORT Handle(TCollection_HAsciiString) CompanyName() const;
0141   
0142   //! Returns the IGES version that the IGES file was written in.
0143   Standard_EXPORT Standard_Integer IGESVersion() const;
0144   
0145   Standard_EXPORT Standard_Integer DraftingStandard() const;
0146   
0147   //! Returns the date and time when the model was created or last
0148   //! modified (for IGES 5.1 and later).
0149   Standard_EXPORT Handle(TCollection_HAsciiString) LastChangeDate() const;
0150   
0151   //! Returns True if the date and time when the model was created or
0152   //! last modified are specified, i.e. not defaulted to NULL.
0153   Standard_EXPORT Standard_Boolean HasLastChangeDate() const;
0154   
0155   Standard_EXPORT void SetLastChangeDate();
0156   
0157   Standard_EXPORT Handle(TCollection_HAsciiString) ApplicationProtocol() const;
0158   
0159   Standard_EXPORT Standard_Boolean HasApplicationProtocol() const;
0160   
0161   //! Returns a string built from year,
0162   //! month, day, hour, minute and second values. The form of the
0163   //! resulting string is defined as follows:
0164   //! -      -1: YYMMDD.HHNNSS,
0165   //! -       0: YYYYMMDD.HHNNSS,
0166   //! -       1: YYYY-MM-DD:HH-NN-SS, where:
0167   //! - YYYY or YY is 4 or 2 digit year,
0168   //! - HH is hour (00-23),
0169   //! - MM is month (01-12),
0170   //! - NN is minute (00-59)
0171   //! - DD is day (01-31),
0172   //! - SS is second (00-59).
0173   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);
0174   
0175   //! Converts the string given in the
0176   //! form YYMMDD.HHNNSS or YYYYMMDD.HHNNSS to either
0177   //! YYMMDD.HHNNSS, YYYYMMDD.HHNNSS or YYYY-MM-DD:HH-NN-SS.
0178   Standard_EXPORT static Handle(TCollection_HAsciiString) NewDateString (const Handle(TCollection_HAsciiString)& date, const Standard_Integer mode = 1);
0179   
0180   //! Returns the unit value (in
0181   //! meters) that the IGES file was written in.
0182   Standard_EXPORT Standard_Real UnitValue() const;
0183   
0184   Standard_EXPORT void SetSeparator (const Standard_Character val);
0185   
0186   Standard_EXPORT void SetEndMark (const Standard_Character val);
0187   
0188   Standard_EXPORT void SetSendName (const Handle(TCollection_HAsciiString)& val);
0189   
0190   Standard_EXPORT void SetFileName (const Handle(TCollection_HAsciiString)& val);
0191   
0192   Standard_EXPORT void SetSystemId (const Handle(TCollection_HAsciiString)& val);
0193   
0194   Standard_EXPORT void SetInterfaceVersion (const Handle(TCollection_HAsciiString)& val);
0195   
0196   Standard_EXPORT void SetIntegerBits (const Standard_Integer val);
0197   
0198   Standard_EXPORT void SetMaxPower10Single (const Standard_Integer val);
0199   
0200   Standard_EXPORT void SetMaxDigitsSingle (const Standard_Integer val);
0201   
0202   Standard_EXPORT void SetMaxPower10Double (const Standard_Integer val);
0203   
0204   Standard_EXPORT void SetMaxDigitsDouble (const Standard_Integer val);
0205   
0206   Standard_EXPORT void SetReceiveName (const Handle(TCollection_HAsciiString)& val);
0207   
0208   Standard_EXPORT void SetCascadeUnit(const Standard_Real theUnit);
0209 
0210   Standard_EXPORT void SetScale (const Standard_Real val);
0211   
0212   Standard_EXPORT void SetUnitFlag (const Standard_Integer val);
0213   
0214   Standard_EXPORT void SetUnitName (const Handle(TCollection_HAsciiString)& val);
0215   
0216   Standard_EXPORT void SetLineWeightGrad (const Standard_Integer val);
0217   
0218   Standard_EXPORT void SetMaxLineWeight (const Standard_Real val);
0219   
0220   Standard_EXPORT void SetDate (const Handle(TCollection_HAsciiString)& val);
0221   
0222   Standard_EXPORT void SetResolution (const Standard_Real val);
0223   
0224   Standard_EXPORT void SetMaxCoord (const Standard_Real val = 0.0);
0225   
0226   Standard_EXPORT void MaxMaxCoord (const Standard_Real val = 0.0);
0227   
0228   Standard_EXPORT void MaxMaxCoords (const gp_XYZ& xyz);
0229   
0230   Standard_EXPORT void SetAuthorName (const Handle(TCollection_HAsciiString)& val);
0231   
0232   Standard_EXPORT void SetCompanyName (const Handle(TCollection_HAsciiString)& val);
0233   
0234   Standard_EXPORT void SetIGESVersion (const Standard_Integer val);
0235   
0236   Standard_EXPORT void SetDraftingStandard (const Standard_Integer val);
0237   
0238   Standard_EXPORT void SetLastChangeDate (const Handle(TCollection_HAsciiString)& val);
0239   
0240   Standard_EXPORT void SetApplicationProtocol (const Handle(TCollection_HAsciiString)& val);
0241 
0242 private:
0243 
0244   Standard_Character theSeparator;
0245   Standard_Character theEndMark;
0246   Handle(TCollection_HAsciiString) theSendName;
0247   Handle(TCollection_HAsciiString) theFileName;
0248   Handle(TCollection_HAsciiString) theSystemId;
0249   Handle(TCollection_HAsciiString) theInterfaceVersion;
0250   Standard_Integer theIntegerBits;
0251   Standard_Integer theMaxPower10Single;
0252   Standard_Integer theMaxDigitsSingle;
0253   Standard_Integer theMaxPower10Double;
0254   Standard_Integer theMaxDigitsDouble;
0255   Handle(TCollection_HAsciiString) theReceiveName;
0256   Standard_Real theScale;
0257   Standard_Real theCascadeUnit;
0258   Standard_Integer theUnitFlag;
0259   Handle(TCollection_HAsciiString) theUnitName;
0260   Standard_Integer theLineWeightGrad;
0261   Standard_Real theMaxLineWeight;
0262   Handle(TCollection_HAsciiString) theDate;
0263   Standard_Real theResolution;
0264   Standard_Real theMaxCoord;
0265   Standard_Boolean hasMaxCoord;
0266   Handle(TCollection_HAsciiString) theAuthorName;
0267   Handle(TCollection_HAsciiString) theCompanyName;
0268   Standard_Integer theIGESVersion;
0269   Standard_Integer theDraftingStandard;
0270   Handle(TCollection_HAsciiString) theLastChangeDate;
0271   Handle(TCollection_HAsciiString) theAppliProtocol;
0272 
0273 };
0274 
0275 #endif // _IGESData_GlobalSection_HeaderFile