0024927: Getting rid of "Persistent" functionality -- Code
[occt.git] / src / PDataStd / PDataStd_IntegerArray_1.cxx
1 // Created on: 2008-03-26
2 // Created by: Sergey ZARITCHNY
3 // Copyright (c) 2008-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #include <PDataStd_IntegerArray_1.ixx>
17
18 //=======================================================================
19 //function : PDataStd_IntegerArray_1
20 //purpose  : 
21 //=======================================================================
22
23 PDataStd_IntegerArray_1::PDataStd_IntegerArray_1 () : myDelta(Standard_False) { }
24
25 //=======================================================================
26 //function : Init
27 //purpose  : 
28 //=======================================================================
29
30 void PDataStd_IntegerArray_1::Init(const Standard_Integer lower,
31                             const Standard_Integer upper)
32 {
33   myValue = new PColStd_HArray1OfInteger(lower, upper);
34 }
35
36
37 //=======================================================================
38 //function : SetValue
39 //purpose  : 
40 //=======================================================================
41
42 void PDataStd_IntegerArray_1::SetValue(const Standard_Integer index, 
43                                        const Standard_Integer value)
44 {
45   myValue->SetValue(index, value);
46 }
47
48 //=======================================================================
49 //function : Value
50 //purpose  : 
51 //=======================================================================
52
53 Standard_Integer PDataStd_IntegerArray_1::Value
54                                    ( const Standard_Integer index ) const
55 {
56   return myValue->Value(index);
57 }
58
59 //=======================================================================
60 //function : Lower
61 //purpose  : 
62 //=======================================================================
63 Standard_Integer PDataStd_IntegerArray_1::Lower (void) const 
64 { return myValue->Lower(); }
65
66
67 //=======================================================================
68 //function : Upper
69 //purpose  : 
70 //=======================================================================
71 Standard_Integer PDataStd_IntegerArray_1::Upper (void) const 
72 { return myValue->Upper(); }
73
74 //=======================================================================
75 //function : SetDelta
76 //purpose  : 
77 //=======================================================================
78 void PDataStd_IntegerArray_1::SetDelta(const Standard_Boolean delta)
79 {
80   myDelta = delta;
81 }
82
83 //=======================================================================
84 //function : GetDelta
85 //purpose  : 
86 //=======================================================================
87 Standard_Boolean PDataStd_IntegerArray_1::GetDelta() const
88 {
89   return myDelta;
90 }