42cf5bc1 |
1 | // Created on: 1993-01-09 |
2 | // Created by: CKY / Contract Toubro-Larsen (Anand NATRAJAN) |
3 | // Copyright (c) 1993-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 _IGESDimen_DimensionUnits_HeaderFile |
18 | #define _IGESDimen_DimensionUnits_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <Standard_Integer.hxx> |
24 | #include <IGESData_IGESEntity.hxx> |
25 | class TCollection_HAsciiString; |
26 | |
27 | |
28 | class IGESDimen_DimensionUnits; |
29 | DEFINE_STANDARD_HANDLE(IGESDimen_DimensionUnits, IGESData_IGESEntity) |
30 | |
31 | //! defines Dimension Units, Type <406>, Form <28> |
32 | //! in package IGESDimen |
33 | //! Describes the units and formatting details of the |
34 | //! nominal value of a dimension. |
35 | class IGESDimen_DimensionUnits : public IGESData_IGESEntity |
36 | { |
37 | |
38 | public: |
39 | |
40 | |
41 | Standard_EXPORT IGESDimen_DimensionUnits(); |
42 | |
43 | //! This method is used to set the fields of the class |
44 | //! DimensionUnits |
45 | //! - nbPropVal : Number of property values, always = 6 |
46 | //! - aSecondPos : Secondary Dimension Position |
47 | //! 0 = This is the main text |
48 | //! 1 = Before primary dimension |
49 | //! 2 = After primary dimension |
50 | //! 3 = Above primary dimension |
51 | //! 4 = Below primary dimension |
52 | //! - aUnitsInd : Units Indicator |
53 | //! - aCharSet : Character Set used |
54 | //! - aFormat : Format HAsciiString |
55 | //! 1 = Standard ASCII |
56 | //! 1001 = Symbol Font 1 |
57 | //! 1002 = Symbol Font 2 |
58 | //! 1003 = Drafting Font |
59 | //! - aFracFlag : Fraction Flag |
60 | //! 0 = Display values as decimal numbers |
61 | //! 1 = Display values as fractions |
62 | //! - aPrecision : Precision Value |
63 | Standard_EXPORT void Init (const Standard_Integer nbPropVal, const Standard_Integer aSecondPos, const Standard_Integer aUnitsInd, const Standard_Integer aCharSet, const Handle(TCollection_HAsciiString)& aFormat, const Standard_Integer aFracFlag, const Standard_Integer aPrecision); |
64 | |
65 | //! returns the number of property values |
66 | Standard_EXPORT Standard_Integer NbPropertyValues() const; |
67 | |
68 | //! returns position of secondary dimension w.r.t. primary dimension |
69 | Standard_EXPORT Standard_Integer SecondaryDimenPosition() const; |
70 | |
71 | //! returns the units indicator |
72 | Standard_EXPORT Standard_Integer UnitsIndicator() const; |
73 | |
74 | //! returns the character set interpretation |
75 | Standard_EXPORT Standard_Integer CharacterSet() const; |
76 | |
77 | //! returns the string used in formatting value |
78 | Standard_EXPORT Handle(TCollection_HAsciiString) FormatString() const; |
79 | |
80 | //! returns the fraction flag |
81 | Standard_EXPORT Standard_Integer FractionFlag() const; |
82 | |
83 | //! returns the precision/denominator |
84 | //! number of decimal places when FractionFlag() = 0 |
85 | //! denominator of fraction when FractionFlag() = 1 |
86 | Standard_EXPORT Standard_Integer PrecisionOrDenominator() const; |
87 | |
88 | |
89 | |
90 | |
92efcf78 |
91 | DEFINE_STANDARD_RTTIEXT(IGESDimen_DimensionUnits,IGESData_IGESEntity) |
42cf5bc1 |
92 | |
93 | protected: |
94 | |
95 | |
96 | |
97 | |
98 | private: |
99 | |
100 | |
101 | Standard_Integer theNbPropertyValues; |
102 | Standard_Integer theSecondaryDimenPosition; |
103 | Standard_Integer theUnitsIndicator; |
104 | Standard_Integer theCharacterSet; |
105 | Handle(TCollection_HAsciiString) theFormatString; |
106 | Standard_Integer theFractionFlag; |
107 | Standard_Integer thePrecision; |
108 | |
109 | |
110 | }; |
111 | |
112 | |
113 | |
114 | |
115 | |
116 | |
117 | |
118 | #endif // _IGESDimen_DimensionUnits_HeaderFile |