Salome HOME
Merge with version on tag OCC-V2_1_0d
[modules/geom.git] / src / NMTDS / NMTDS_IndexRange.cxx
1 // File:        NMTDS_IndexRange.cxx
2 // Created:     Fri Nov 28 10:34:59 2003
3 // Author:      Peter KURNEV
4 //              <pkv@irinox>
5
6
7 #include <NMTDS_IndexRange.ixx>
8 //=======================================================================
9 //function :NMTDS_IndexRange::NMTDS_IndexRange
10 //purpose  : 
11 //=======================================================================
12   NMTDS_IndexRange::NMTDS_IndexRange()
13 :
14   myFirst(0),
15   myLast(0)
16 {
17 }
18 //=======================================================================
19 //function :SetFirst
20 //purpose  : 
21 //=======================================================================
22   void NMTDS_IndexRange::SetFirst(const Standard_Integer aFirst)
23 {
24   myFirst=aFirst;
25 }
26 //=======================================================================
27 //function :First
28 //purpose  : 
29 //=======================================================================
30   Standard_Integer NMTDS_IndexRange::First()const
31 {
32   return myFirst;
33 }
34 //=======================================================================
35 //function :SetLast
36 //purpose  : 
37 //=======================================================================
38   void NMTDS_IndexRange::SetLast(const Standard_Integer aLast)
39 {
40   myLast=aLast;
41 }
42 //=======================================================================
43 //function :Last
44 //purpose  : 
45 //=======================================================================
46   Standard_Integer NMTDS_IndexRange::Last()const
47 {
48   return myLast;
49 }
50 //=======================================================================
51 //function :IsInRange
52 //purpose  : 
53 //=======================================================================
54   Standard_Boolean NMTDS_IndexRange::IsInRange(const Standard_Integer aIndex)const
55 {
56   return (Standard_Boolean)(aIndex>=myFirst && aIndex<=myLast);
57 }