0024428: Implementation of LGPL license
[occt.git] / src / BOPDS / BOPDS_IndexRange.lxx
1 // Created by: Peter KURNEV
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 //
4 // This file is part of Open CASCADE Technology software library.
5 //
6 // This library is free software; you can redistribute it and / or modify it
7 // under the terms of the GNU Lesser General Public version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
11 //
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
14
15 //=======================================================================
16 //function :
17 //purpose  : 
18 //=======================================================================
19   inline BOPDS_IndexRange::BOPDS_IndexRange()
20 :
21   myFirst(0),
22   myLast(0)
23 {
24 }
25 //=======================================================================
26 //function : ~
27 //purpose  : 
28 //=======================================================================
29   inline BOPDS_IndexRange::~BOPDS_IndexRange()
30 {
31 }
32 //=======================================================================
33 //function : SetFirst
34 //purpose  : 
35 //=======================================================================
36   inline void BOPDS_IndexRange::SetFirst(const Standard_Integer aFirst)
37 {
38   myFirst=aFirst;
39 }
40 //=======================================================================
41 //function : First
42 //purpose  : 
43 //=======================================================================
44   inline Standard_Integer BOPDS_IndexRange::First()const
45 {
46   return myFirst;
47 }
48 //=======================================================================
49 //function : SetLast
50 //purpose  : 
51 //=======================================================================
52   inline void BOPDS_IndexRange::SetLast(const Standard_Integer aLast)
53 {
54   myLast=aLast;
55 }
56 //=======================================================================
57 //function :Last
58 //purpose  : 
59 //=======================================================================
60   inline Standard_Integer BOPDS_IndexRange::Last()const
61 {
62   return myLast;
63 }
64 //=======================================================================
65 //function : SetIndices
66 //purpose  : 
67 //=======================================================================
68   inline void BOPDS_IndexRange::SetIndices(const Standard_Integer theI1,
69                                            const Standard_Integer theI2)
70 {
71   myFirst=theI1;
72   myLast=theI2;
73 }
74 //=======================================================================
75 //function : Indices
76 //purpose  : 
77 //=======================================================================
78   inline void BOPDS_IndexRange::Indices(Standard_Integer& theI1,
79                                         Standard_Integer& theI2)const
80 {
81   theI1=myFirst;
82   theI2=myLast;
83 }
84
85 //=======================================================================
86 //function : Contains
87 //purpose  : 
88 //=======================================================================
89   inline Standard_Boolean BOPDS_IndexRange::Contains(const Standard_Integer aIndex)const
90 {
91   return (Standard_Boolean)(aIndex>=myFirst && aIndex<=myLast);
92 }