1 // Created on: 1993-01-13
2 // Created by: CKY / Contract Toubro-Larsen ( Deepak PRABHU )
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IGESDefs_UnitsData_HeaderFile
18 #define _IGESDefs_UnitsData_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Interface_HArray1OfHAsciiString.hxx>
24 #include <TColStd_HArray1OfReal.hxx>
25 #include <IGESData_IGESEntity.hxx>
26 #include <Standard_Integer.hxx>
27 #include <Standard_Real.hxx>
28 class Standard_DimensionMismatch;
29 class Standard_OutOfRange;
30 class TCollection_HAsciiString;
33 class IGESDefs_UnitsData;
34 DEFINE_STANDARD_HANDLE(IGESDefs_UnitsData, IGESData_IGESEntity)
36 //! defines IGES UnitsData Entity, Type <316> Form <0>
37 //! in package IGESDefs
38 //! This class stores data about a model's fundamental units.
39 class IGESDefs_UnitsData : public IGESData_IGESEntity
45 Standard_EXPORT IGESDefs_UnitsData();
47 //! This method is used to set the fields of the class
49 //! - unitTypes : Types of the units being defined
50 //! - unitValues : Unit Values of the units
51 //! - unitScales : Multiplicative Scale Factors
52 //! raises exception if lengths of unitTypes, unitValues and
53 //! unitScale are not same
54 Standard_EXPORT void Init (const Handle(Interface_HArray1OfHAsciiString)& unitTypes, const Handle(Interface_HArray1OfHAsciiString)& unitValues, const Handle(TColStd_HArray1OfReal)& unitScales);
56 //! returns the Number of units defined by this entity
57 Standard_EXPORT Standard_Integer NbUnits() const;
59 //! returns the Type of the UnitNum'th unit being defined
60 //! raises exception if UnitNum <= 0 or UnitNum > NbUnits()
61 Standard_EXPORT Handle(TCollection_HAsciiString) UnitType (const Standard_Integer UnitNum) const;
63 //! returns the Units of the UnitNum'th unit being defined
64 //! raises exception if UnitNum <= 0 or UnitNum > NbUnits()
65 Standard_EXPORT Handle(TCollection_HAsciiString) UnitValue (const Standard_Integer UnitNum) const;
67 //! returns the multiplicative scale factor to be apllied to the
68 //! UnitNum'th unit being defined
69 //! raises exception if UnitNum <= 0 or UnitNum > NbUnits()
70 Standard_EXPORT Standard_Real ScaleFactor (const Standard_Integer UnitNum) const;
75 DEFINE_STANDARD_RTTI(IGESDefs_UnitsData,IGESData_IGESEntity)
85 Handle(Interface_HArray1OfHAsciiString) theUnitTypes;
86 Handle(Interface_HArray1OfHAsciiString) theUnitValues;
87 Handle(TColStd_HArray1OfReal) theUnitScales;
98 #endif // _IGESDefs_UnitsData_HeaderFile