// Created by: Peter KURNEV
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.

//=======================================================================
//function :
//purpose  : 
//=======================================================================
  inline BOPDS_IndexRange::BOPDS_IndexRange()
:
  myFirst(0),
  myLast(0)
{
}
//=======================================================================
//function : SetFirst
//purpose  : 
//=======================================================================
  inline void BOPDS_IndexRange::SetFirst(const Standard_Integer aFirst)
{
  myFirst=aFirst;
}
//=======================================================================
//function : First
//purpose  : 
//=======================================================================
  inline Standard_Integer BOPDS_IndexRange::First()const
{
  return myFirst;
}
//=======================================================================
//function : SetLast
//purpose  : 
//=======================================================================
  inline void BOPDS_IndexRange::SetLast(const Standard_Integer aLast)
{
  myLast=aLast;
}
//=======================================================================
//function :Last
//purpose  : 
//=======================================================================
  inline Standard_Integer BOPDS_IndexRange::Last()const
{
  return myLast;
}
//=======================================================================
//function : SetIndices
//purpose  : 
//=======================================================================
  inline void BOPDS_IndexRange::SetIndices(const Standard_Integer theI1,
					   const Standard_Integer theI2)
{
  myFirst=theI1;
  myLast=theI2;
}
//=======================================================================
//function : Indices
//purpose  : 
//=======================================================================
  inline void BOPDS_IndexRange::Indices(Standard_Integer& theI1,
					Standard_Integer& theI2)const
{
  theI1=myFirst;
  theI2=myLast;
}

//=======================================================================
//function : Contains
//purpose  : 
//=======================================================================
inline Standard_Boolean BOPDS_IndexRange::Contains(const Standard_Integer aIndex)const
{
  return aIndex >= myFirst
      && aIndex <= myLast;
}
