b311480e |
1 | // Created on: 2007-05-29 |
2 | // Created by: Vlad Romashko |
973c2be1 |
3 | // Copyright (c) 2007-2014 OPEN CASCADE SAS |
b311480e |
4 | // |
973c2be1 |
5 | // This file is part of Open CASCADE Technology software library. |
b311480e |
6 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
12 | // |
973c2be1 |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
7fd59977 |
15 | |
16 | #include <PDataStd_BooleanList.ixx> |
17 | |
18 | //======================================================================= |
19 | //function : PDataStd_BooleanList |
20 | //purpose : |
21 | //======================================================================= |
22 | PDataStd_BooleanList::PDataStd_BooleanList() |
23 | { |
24 | |
25 | } |
26 | |
27 | //======================================================================= |
28 | //function : Init |
29 | //purpose : |
30 | //======================================================================= |
31 | void PDataStd_BooleanList::Init(const Standard_Integer lower, |
32 | const Standard_Integer upper) |
33 | { |
34 | if (upper >= lower) |
35 | myValue = new PColStd_HArray1OfInteger(lower, upper); |
36 | } |
37 | |
38 | //======================================================================= |
39 | //function : SetValue |
40 | //purpose : |
41 | //======================================================================= |
42 | void PDataStd_BooleanList::SetValue(const Standard_Integer index, const Standard_Integer value) |
43 | { |
44 | myValue->SetValue(index, value); |
45 | } |
46 | |
47 | //======================================================================= |
48 | //function : Value |
49 | //purpose : |
50 | //======================================================================= |
51 | Standard_Integer PDataStd_BooleanList::Value( const Standard_Integer index ) const |
52 | { |
53 | return myValue->Value(index); |
54 | } |
55 | |
56 | //======================================================================= |
57 | //function : Lower |
58 | //purpose : |
59 | //======================================================================= |
60 | Standard_Integer PDataStd_BooleanList::Lower (void) const |
61 | { |
62 | if (!myValue.IsNull()) |
63 | return myValue->Lower(); |
64 | return 0; |
65 | } |
66 | |
67 | //======================================================================= |
68 | //function : Upper |
69 | //purpose : |
70 | //======================================================================= |
71 | Standard_Integer PDataStd_BooleanList::Upper (void) const |
72 | { |
73 | if (!myValue.IsNull()) |
74 | return myValue->Upper(); |
75 | return -1; |
76 | } |