File indexing completed on 2025-01-18 10:05:29
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Units_HeaderFile
0018 #define _Units_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <Standard_CString.hxx>
0025 #include <Standard_Boolean.hxx>
0026 #include <Standard_Real.hxx>
0027 class Units_UnitsDictionary;
0028 class Units_Quantity;
0029 class Units_Lexicon;
0030 class Units_Dimensions;
0031
0032
0033
0034
0035
0036
0037 class Units
0038 {
0039 public:
0040
0041 DEFINE_STANDARD_ALLOC
0042
0043
0044
0045
0046
0047 Standard_EXPORT static void UnitsFile (const Standard_CString afile);
0048
0049
0050
0051 Standard_EXPORT static void LexiconFile (const Standard_CString afile);
0052
0053
0054
0055
0056 Standard_EXPORT static Handle(Units_UnitsDictionary) DictionaryOfUnits (const Standard_Boolean amode = Standard_False);
0057
0058
0059 Standard_EXPORT static Handle(Units_Quantity) Quantity (const Standard_CString aquantity);
0060
0061
0062 Standard_EXPORT static Standard_CString FirstQuantity (const Standard_CString aunit);
0063
0064
0065
0066
0067
0068 Standard_EXPORT static Handle(Units_Lexicon) LexiconUnits (const Standard_Boolean amode = Standard_True);
0069
0070
0071 Standard_EXPORT static Handle(Units_Lexicon) LexiconFormula();
0072
0073
0074 Standard_EXPORT static Handle(Units_Dimensions) NullDimensions();
0075
0076
0077 Standard_EXPORT static Standard_Real Convert (const Standard_Real avalue, const Standard_CString afirstunit, const Standard_CString asecondunit);
0078
0079 Standard_EXPORT static Standard_Real ToSI (const Standard_Real aData, const Standard_CString aUnit);
0080
0081 Standard_EXPORT static Standard_Real ToSI (const Standard_Real aData, const Standard_CString aUnit, Handle(Units_Dimensions)& aDim);
0082
0083 Standard_EXPORT static Standard_Real FromSI (const Standard_Real aData, const Standard_CString aUnit);
0084
0085 Standard_EXPORT static Standard_Real FromSI (const Standard_Real aData, const Standard_CString aUnit, Handle(Units_Dimensions)& aDim);
0086
0087
0088 Standard_EXPORT static Handle(Units_Dimensions) Dimensions (const Standard_CString aType);
0089
0090 };
0091
0092 #endif