Back to index

salome-geom  6.5.0
NMTDS_IndexRange.cxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 // File:        NMTDS_IndexRange.cxx
00024 // Created:     Fri Nov 28 10:34:59 2003
00025 // Author:      Peter KURNEV
00026 //              <pkv@irinox>
00027 //
00028 #include <NMTDS_IndexRange.hxx>
00029 
00030 //=======================================================================
00031 //function :NMTDS_IndexRange::NMTDS_IndexRange
00032 //purpose  : 
00033 //=======================================================================
00034   NMTDS_IndexRange::NMTDS_IndexRange()
00035 :
00036   myFirst(0),
00037   myLast(0)
00038 {
00039 }
00040 //=======================================================================
00041 //function :SetFirst
00042 //purpose  : 
00043 //=======================================================================
00044   void NMTDS_IndexRange::SetFirst(const Standard_Integer aFirst)
00045 {
00046   myFirst=aFirst;
00047 }
00048 //=======================================================================
00049 //function :First
00050 //purpose  : 
00051 //=======================================================================
00052   Standard_Integer NMTDS_IndexRange::First()const
00053 {
00054   return myFirst;
00055 }
00056 //=======================================================================
00057 //function :SetLast
00058 //purpose  : 
00059 //=======================================================================
00060   void NMTDS_IndexRange::SetLast(const Standard_Integer aLast)
00061 {
00062   myLast=aLast;
00063 }
00064 //=======================================================================
00065 //function :Last
00066 //purpose  : 
00067 //=======================================================================
00068   Standard_Integer NMTDS_IndexRange::Last()const
00069 {
00070   return myLast;
00071 }
00072 //=======================================================================
00073 //function :IsInRange
00074 //purpose  : 
00075 //=======================================================================
00076   Standard_Boolean NMTDS_IndexRange::IsInRange(const Standard_Integer aIndex)const
00077 {
00078   return (Standard_Boolean)(aIndex>=myFirst && aIndex<=myLast);
00079 }