1 // Created by: Peter KURNEV
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
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
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.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
15 #ifndef _BOPDS_IndexRange_HeaderFile
16 #define _BOPDS_IndexRange_HeaderFile
18 #include <Standard.hxx>
19 #include <Standard_DefineAlloc.hxx>
20 #include <Standard_Handle.hxx>
22 #include <Standard_Integer.hxx>
23 #include <Standard_Boolean.hxx>
27 //! The class BOPDS_IndexRange is to store
28 //! the information about range of two indices
29 class BOPDS_IndexRange
39 Standard_EXPORT virtual ~BOPDS_IndexRange();
43 //! Sets the first index <theI1> of the range
44 void SetFirst (const Standard_Integer theI1);
48 //! Sets the second index <theI2> of the range
49 void SetLast (const Standard_Integer theI2);
53 //! Returns the first index of the range
54 Standard_Integer First() const;
58 //! Returns the second index of the range
59 Standard_Integer Last() const;
63 //! Sets the first index of the range <theI1>
64 //! Sets the second index of the range <theI2>
65 void SetIndices (const Standard_Integer theI1, const Standard_Integer theI2);
69 //! Returns the first index of the range <theI1>
70 //! Returns the second index of the range <theI2>
71 void Indices (Standard_Integer& theI1, Standard_Integer& theI2) const;
75 //! Returns true if the range contains <theIndex>
76 Standard_Boolean Contains (const Standard_Integer theIndex) const;
78 Standard_EXPORT void Dump() const;
87 Standard_Integer myFirst;
88 Standard_Integer myLast;
100 #include <BOPDS_IndexRange.lxx>
106 #endif // _BOPDS_IndexRange_HeaderFile