blob: c59134f4be65c1035f238ea3daf42ccbd9d2f021 (
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
|
// File: Units_Quantity.cxx
// Created: Wed Jun 24 12:48:27 1992
// Author: Gilles DEBARBOUILLE
// <gde@phobox>
#include <Units_Quantity.ixx>
#include <Units_Unit.hxx>
#include <Units_Operators.hxx>
//=======================================================================
//function : IsEqual
//purpose :
//=======================================================================
Standard_Boolean Units_Quantity::IsEqual(const Standard_CString astring) const
{
return (Name() == astring);
}
//=======================================================================
//function : Dump
//purpose :
//=======================================================================
void Units_Quantity::Dump(const Standard_Integer ashift,
const Standard_Integer alevel) const
{
Standard_Integer index;
cout<<endl;
for(int i=0; i<ashift; i++)cout<<" ";
cout<<Name()<<endl;
// thedimensions->Dump(ashift+1);
if(alevel > 0)
{
for(index=1;index<=theunitssequence->Length();index++)
theunitssequence->Value(index)->Dump(ashift+1,0);
}
}
//=======================================================================
//function : operator ==
//purpose :
//=======================================================================
Standard_Boolean operator ==(const Handle(Units_Quantity)& aquantity,const Standard_CString astring)
{
return aquantity->IsEqual(astring);
}
|