blob: 4ac306f73df66b9195a107e76a63a181a86d5845 (
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
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
|
// 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_Unit_HeaderFile
#define _Units_Unit_HeaderFile
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_Units_Unit_HeaderFile
#include <Handle_Units_Unit.hxx>
#endif
#ifndef _Handle_TCollection_HAsciiString_HeaderFile
#include <Handle_TCollection_HAsciiString.hxx>
#endif
#ifndef _Handle_TColStd_HSequenceOfHAsciiString_HeaderFile
#include <Handle_TColStd_HSequenceOfHAsciiString.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Handle_Units_Quantity_HeaderFile
#include <Handle_Units_Quantity.hxx>
#endif
#ifndef _MMgt_TShared_HeaderFile
#include <MMgt_TShared.hxx>
#endif
#ifndef _Standard_CString_HeaderFile
#include <Standard_CString.hxx>
#endif
#ifndef _TCollection_AsciiString_HeaderFile
#include <TCollection_AsciiString.hxx>
#endif
#ifndef _Handle_Units_Token_HeaderFile
#include <Handle_Units_Token.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
class TCollection_HAsciiString;
class TColStd_HSequenceOfHAsciiString;
class Units_Quantity;
class Units_Token;
//! This class defines an elementary word contained in <br>
//! a physical quantity. <br>
class Units_Unit : public MMgt_TShared {
public:
//! Creates and returns a unit. <aname> is the name of <br>
//! the unit, <asymbol> is the usual abbreviation of the <br>
//! unit, and <avalue> is the value in relation to the <br>
//! International System of Units. <br>
Standard_EXPORT Units_Unit(const Standard_CString aname,const Standard_CString asymbol,const Standard_Real avalue,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_Unit(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_Unit(const Standard_CString aname);
//! Returns the name of the unit <thename> <br>
TCollection_AsciiString Name() const;
//! Adds a new symbol <asymbol> attached to <me>. <br>
Standard_EXPORT void Symbol(const Standard_CString asymbol) ;
//! Returns the value in relation with the International <br>
//! System of Units. <br>
Standard_Real Value() const;
//! Returns <thequantity> contained in <me>. <br>
Handle_Units_Quantity Quantity() const;
//! Returns the sequence of symbols <thesymbolssequence> <br>
Handle_TColStd_HSequenceOfHAsciiString SymbolsSequence() const;
//! Sets the value <avalue> to <me>. <br>
void Value(const Standard_Real avalue) ;
//! Sets the physical Quantity <aquantity> to <me>. <br>
void Quantity(const Handle(Units_Quantity)& aquantity) ;
//! Starting with <me>, returns a new Token object. <br>
Standard_EXPORT virtual Handle_Units_Token Token() const;
//! Compares all the symbols linked within <me> with the <br>
//! name of <atoken>, and returns True if there is one <br>
//! symbol equal to the name, False otherwise. <br>
Standard_EXPORT Standard_Boolean IsEqual(const Standard_CString astring) const;
//! Useful for debugging <br>
Standard_EXPORT virtual void Dump(const Standard_Integer ashift,const Standard_Integer alevel) const;
DEFINE_STANDARD_RTTI(Units_Unit)
protected:
Handle_TColStd_HSequenceOfHAsciiString thesymbolssequence;
Standard_Real thevalue;
private:
Handle_TCollection_HAsciiString thename;
Handle_Units_Quantity thequantity;
};
#include <Units_Unit.lxx>
// other Inline functions and methods (like "C++: function call" methods)
#endif
|