summaryrefslogtreecommitdiff
path: root/inc/Quantity_Convert.hxx
blob: f67427335f4a0695c18f1292555ecb488fed8303 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _Quantity_Convert_HeaderFile
#define _Quantity_Convert_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _Quantity_PhysicalQuantity_HeaderFile
#include <Quantity_PhysicalQuantity.hxx>
#endif
#ifndef _Quantity_Coefficient_HeaderFile
#include <Quantity_Coefficient.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
class TCollection_AsciiString;


//! Services to manage units conversion between Front-ends and Engines. <br>
//! This conversion is managed by a table of correspondance between the quantities <br>
//! and their "conversion coefficient". <br>
//! This table is implemented like an external array (TCollection_Array1) regarding <br>
//! to the quantities enumeration. <br>
class Quantity_Convert  {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  //! Creates an object; <br>
  Standard_EXPORT   Quantity_Convert();
  //! Updates the conversion table (correspondances between <br>
//! Quantities and conversion coefficients). <br>
      static  void SetQuantity(const Quantity_PhysicalQuantity aQuantity,const Quantity_Coefficient aCoef) ;
  //! Converts, from the conversion table, the value <aVal> <br>
//! from the user system to the SI system. <br>
      static  Standard_Real ConvertUserToSI(const Quantity_PhysicalQuantity aQuantity,const Standard_Real aVal) ;
  //! Converts, from the conversion table, the value <aVal> <br>
//! from the SI system to the user system. <br>
      static  Standard_Real ConvertSIToUser(const Quantity_PhysicalQuantity aQuantity,const Standard_Real aVal) ;
  
//! if (aType is a physical quantity) <br>
//!    returns True and the name of the associated PhysicalQuantity . <br>
//! else <br>
//!    returns False. <br>
  Standard_EXPORT   static  Standard_Boolean IsPhysicalQuantity(const TCollection_AsciiString& aTypeName,TCollection_AsciiString& anEnum) ;





protected:





private:





};


#include <Quantity_Convert.lxx>



// other Inline functions and methods (like "C++: function call" methods)


#endif