/usr/include/oce/Units_Measurement.hxx is in liboce-foundation-dev 0.18.2-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | // 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_Measurement_HeaderFile
#define _Units_Measurement_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Macro.hxx>
#include <Standard_Real.hxx>
#include <Handle_Units_Token.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_CString.hxx>
class Units_Token;
//! This class defines a measurement which is the
//! association of a real value and a unit.
class Units_Measurement
{
public:
DEFINE_STANDARD_ALLOC
//! It is the empty constructor of the class.
Standard_EXPORT Units_Measurement();
//! Returns an instance of this class. <avalue> defines
//! the measurement, and <atoken> the token which defines
//! the unit used.
Standard_EXPORT Units_Measurement(const Standard_Real avalue, const Handle(Units_Token)& atoken);
//! Returns an instance of this class. <avalue> defines
//! the measurement, and <aunit> the unit used,
//! described in natural language.
Standard_EXPORT Units_Measurement(const Standard_Real avalue, const Standard_CString aunit);
//! Converts (if possible) the measurement object into
//! another unit. <aunit> must have the same
//! dimensionality as the unit contained in the token
//! <thetoken>.
Standard_EXPORT void Convert (const Standard_CString aunit) ;
//! Returns a Measurement object with the integer value of
//! the measurement contained in <me>.
Standard_EXPORT Units_Measurement Integer() const;
//! Returns a Measurement object with the fractional value
//! of the measurement contained in <me>.
Standard_EXPORT Units_Measurement Fractional() const;
//! Returns the value of the measurement.
Standard_EXPORT Standard_Real Measurement() const;
//! Returns the token contained in <me>.
Standard_EXPORT Handle(Units_Token) Token() const;
//! Returns (if it is possible) a measurement which is the
//! addition of <me> and <ameasurement>. The chosen
//! returned unit is the unit of <me>.
Standard_EXPORT Units_Measurement Add (const Units_Measurement& ameasurement) const;
Units_Measurement operator + (const Units_Measurement& ameasurement) const
{
return Add(ameasurement);
}
//! Returns (if it is possible) a measurement which is the
//! subtraction of <me> and <ameasurement>. The chosen
//! returned unit is the unit of <me>.
Standard_EXPORT Units_Measurement Subtract (const Units_Measurement& ameasurement) const;
Units_Measurement operator - (const Units_Measurement& ameasurement) const
{
return Subtract(ameasurement);
}
//! Returns a measurement which is the multiplication of
//! <me> and <ameasurement>.
Standard_EXPORT Units_Measurement Multiply (const Units_Measurement& ameasurement) const;
Units_Measurement operator * (const Units_Measurement& ameasurement) const
{
return Multiply(ameasurement);
}
//! Returns a measurement which is the multiplication of
//! <me> with the value <avalue>.
Standard_EXPORT Units_Measurement Multiply (const Standard_Real avalue) const;
Units_Measurement operator * (const Standard_Real avalue) const
{
return Multiply(avalue);
}
//! Returns a measurement which is the division of <me> by
//! <ameasurement>.
Standard_EXPORT Units_Measurement Divide (const Units_Measurement& ameasurement) const;
Units_Measurement operator / (const Units_Measurement& ameasurement) const
{
return Divide(ameasurement);
}
//! Returns a measurement which is the division of <me> by
//! the constant <avalue>.
Standard_EXPORT Units_Measurement Divide (const Standard_Real avalue) const;
Units_Measurement operator / (const Standard_Real avalue) const
{
return Divide(avalue);
}
//! Returns a measurement which is <me> powered
//! <anexponent>.
Standard_EXPORT Units_Measurement Power (const Standard_Real anexponent) const;
Standard_EXPORT Standard_Boolean HasToken() const;
//! Useful for debugging.
Standard_EXPORT void Dump() const;
protected:
private:
Standard_Real themeasurement;
Handle(Units_Token) thetoken;
Standard_Boolean myHasToken;
};
#endif // _Units_Measurement_HeaderFile
|