blob: 83c094663785fb2808b065594e443c962fcdcbd3 (
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
|
// File: PDataStd_IntPackedMap_1.cxx
// Created: Thu Mar 27 17:22:25 2008
// Author: Sergey ZARITCHNY
// <sergey.zaritchny@opencascade.com>
// Copyright: Open CasCade SA 2008
#include <PDataStd_IntPackedMap_1.ixx>
#include <PColStd_HArray1OfInteger.hxx>
//=======================================================================
//function : PDataStd_IntPackedMap_1
//purpose : Constructor
//=======================================================================
PDataStd_IntPackedMap_1::PDataStd_IntPackedMap_1() {}
//=======================================================================
//function : Init
//purpose : Initializes the internal container
//=======================================================================
void PDataStd_IntPackedMap_1::Init(const Standard_Integer theLow,
const Standard_Integer theUp) {
myIntValues = new PColStd_HArray1OfInteger(theLow, theUp);
}
//=======================================================================
//function : GetValue
//purpose :
//=======================================================================
Standard_Integer PDataStd_IntPackedMap_1::GetValue(
const Standard_Integer theIndex) const
{ return myIntValues->Value(theIndex); }
//=======================================================================
//function : SetValue
//purpose :
//=======================================================================
void PDataStd_IntPackedMap_1::SetValue(const Standard_Integer theIndx,
const Standard_Integer theValue)
{
myIntValues->SetValue(theIndx, theValue);
}
//=======================================================================
//function : IsEmpty
//purpose :
//=======================================================================
Standard_Boolean PDataStd_IntPackedMap_1::IsEmpty() const
{
if(myIntValues.IsNull()) return Standard_True;
if(!myIntValues->Upper() && !myIntValues->Lower()) return Standard_True;
return Standard_False;
}
//=======================================================================
//function : Returns an upper bound of the internal container
//purpose :
//=======================================================================
Standard_Integer PDataStd_IntPackedMap_1::Upper() const
{
if(myIntValues.IsNull()) return 0;
return myIntValues->Upper();
}
//=======================================================================
//function : Returns a lower bound of the internal container
//purpose :
//=======================================================================
Standard_Integer PDataStd_IntPackedMap_1::Lower() const
{
if(myIntValues.IsNull()) return 0;
return myIntValues->Lower();
}
//=======================================================================
//function : SetDelta
//purpose :
//=======================================================================
void PDataStd_IntPackedMap_1::SetDelta(const Standard_Boolean delta)
{
myDelta = delta;
}
//=======================================================================
//function : GetDelta
//purpose :
//=======================================================================
Standard_Boolean PDataStd_IntPackedMap_1::GetDelta() const
{
return myDelta;
}
|