Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/BOPDS_IndexRange.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 //! The class BOPDS_IndexRange is to store
0025 //! the information about range of two indices
0026 class BOPDS_IndexRange
0027 {
0028 public:
0029   DEFINE_STANDARD_ALLOC
0030 
0031   //! Empty constructor
0032   BOPDS_IndexRange();
0033 
0034   //! Constructor with initial indices
0035   BOPDS_IndexRange(const int theI1, const int theI2);
0036 
0037   //! Modifier
0038   //! Sets the first index <theI1> of the range
0039   void SetFirst(const int theI1);
0040 
0041   //! Modifier
0042   //! Sets the second index <theI2> of the range
0043   void SetLast(const int theI2);
0044 
0045   //! Selector
0046   //! Returns the first index of the range
0047   int First() const;
0048 
0049   //! Selector
0050   //! Returns the second index of the range
0051   int Last() const;
0052 
0053   //! Modifier
0054   //! Sets the first index of the range  <theI1>
0055   //! Sets the second index of the range <theI2>
0056   void SetIndices(const int theI1, const int theI2);
0057 
0058   //! Selector
0059   //! Returns the first index of the range  <theI1>
0060   //! Returns the second index of the range <theI2>
0061   void Indices(int& theI1, int& theI2) const;
0062 
0063   //! Query
0064   //! Returns true if the range contains <theIndex>
0065   bool Contains(const int theIndex) const;
0066 
0067   Standard_EXPORT void Dump() const;
0068 
0069 protected:
0070   int myFirst;
0071   int myLast;
0072 };
0073 
0074 #include <BOPDS_IndexRange.lxx>
0075 
0076 #endif // _BOPDS_IndexRange_HeaderFile