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