summaryrefslogtreecommitdiff
path: root/inc/Units_ShiftedUnit.hxx
blob: 386e0c3e80619ac72a5bc3cadfcb357693ee2006 (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
97
98
99
100
101
// 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 _Units_ShiftedUnit_HeaderFile
#define _Units_ShiftedUnit_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_Units_ShiftedUnit_HeaderFile
#include <Handle_Units_ShiftedUnit.hxx>
#endif

#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Units_Unit_HeaderFile
#include <Units_Unit.hxx>
#endif
#ifndef _Standard_CString_HeaderFile
#include <Standard_CString.hxx>
#endif
#ifndef _Handle_Units_Quantity_HeaderFile
#include <Handle_Units_Quantity.hxx>
#endif
#ifndef _Handle_Units_Token_HeaderFile
#include <Handle_Units_Token.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
class Units_Quantity;
class Units_Token;


//! This class is useful   to describe  units  with  a <br>
//!          shifted origin in relation to another unit. A well <br>
//!          known example  is the  Celsius degrees in relation <br>
//!          to Kelvin degrees. The shift of the Celsius origin <br>
//!          is 273.15 Kelvin degrees. <br>
class Units_ShiftedUnit : public Units_Unit {

public:

  //! Creates  and  returns a  shifted unit.   <aname> is the <br>
//!          name of the unit,  <asymbol> is the usual abbreviation <br>
//!          of the unit, <avalue> is the  value in relation to the <br>
//!          International System of Units, and <amove>  is the gap <br>
//!          in relation to another unit. <br>
//! <br>
//!          For  example Celcius   dregee   of temperature  is  an <br>
//!          instance of ShiftedUnit  with <avalue> equal to 1. and <br>
//!          <amove> equal to 273.15. <br>
  Standard_EXPORT   Units_ShiftedUnit(const Standard_CString aname,const Standard_CString asymbol,const Standard_Real avalue,const Standard_Real amove,const Handle(Units_Quantity)& aquantity);
  //! Creates  and returns a  unit.  <aname> is  the name of <br>
//!          the  unit, <asymbol> is the  usual abbreviation of the <br>
//!          unit. <br>
  Standard_EXPORT   Units_ShiftedUnit(const Standard_CString aname,const Standard_CString asymbol);
  //! Creates  and returns a  unit.  <aname> is  the name of <br>
//!          the  unit. <br>
  Standard_EXPORT   Units_ShiftedUnit(const Standard_CString aname);
  //! Sets the field <themove> to <amove> <br>
  Standard_EXPORT     void Move(const Standard_Real amove) ;
  //! Returns the shifted value <themove>. <br>
  Standard_EXPORT     Standard_Real Move() const;
  //! This redefined method returns a ShiftedToken object. <br>
  Standard_EXPORT   virtual  Handle_Units_Token Token() const;
  
  Standard_EXPORT   virtual  void Dump(const Standard_Integer ashift,const Standard_Integer alevel) const;




  DEFINE_STANDARD_RTTI(Units_ShiftedUnit)

protected:




private: 


Standard_Real themove;


};





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


#endif