Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:04

0001 // Created by: Peter KURNEV
0002 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014 
0015 #ifndef _BOPDS_IndexRange_HeaderFile
0016 #define _BOPDS_IndexRange_HeaderFile
0017 
0018 #include <Standard.hxx>
0019 #include <Standard_DefineAlloc.hxx>
0020 #include <Standard_Handle.hxx>
0021 
0022 #include <Standard_Boolean.hxx>
0023 
0024 
0025 
0026 //! The class BOPDS_IndexRange is to store
0027 //! the information about range of two indices
0028 class BOPDS_IndexRange 
0029 {
0030 public:
0031 
0032   DEFINE_STANDARD_ALLOC
0033 
0034   
0035 
0036   //! Empty constructor
0037     BOPDS_IndexRange();
0038 
0039   //! Modifier
0040   //! Sets the first index <theI1>  of the range
0041     void SetFirst (const Standard_Integer theI1);
0042   
0043 
0044   //! Modifier
0045   //! Sets the second index <theI2>  of the range
0046     void SetLast (const Standard_Integer theI2);
0047   
0048 
0049   //! Selector
0050   //! Returns the first index of the range
0051     Standard_Integer First() const;
0052   
0053 
0054   //! Selector
0055   //! Returns the second index of the range
0056     Standard_Integer Last() const;
0057   
0058 
0059   //! Modifier
0060   //! Sets the first index of the range  <theI1>
0061   //! Sets the second index of the range <theI2>
0062     void SetIndices (const Standard_Integer theI1, const Standard_Integer theI2);
0063   
0064 
0065   //! Selector
0066   //! Returns the first index of the range  <theI1>
0067   //! Returns the second index of the range <theI2>
0068     void Indices (Standard_Integer& theI1, Standard_Integer& theI2) const;
0069   
0070 
0071   //! Query
0072   //! Returns true if the range contains <theIndex>
0073     Standard_Boolean Contains (const Standard_Integer theIndex) const;
0074   
0075   Standard_EXPORT void Dump() const;
0076 
0077 
0078 
0079 
0080 protected:
0081 
0082 
0083 
0084   Standard_Integer myFirst;
0085   Standard_Integer myLast;
0086 
0087 
0088 private:
0089 
0090 
0091 
0092 
0093 
0094 };
0095 
0096 
0097 #include <BOPDS_IndexRange.lxx>
0098 
0099 
0100 
0101 
0102 
0103 #endif // _BOPDS_IndexRange_HeaderFile