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_Pave_HeaderFile
0016 #define _BOPDS_Pave_HeaderFile
0017 
0018 #include <Standard.hxx>
0019 #include <Standard_DefineAlloc.hxx>
0020 #include <Standard_Handle.hxx>
0021 
0022 #include <Standard_Real.hxx>
0023 #include <Standard_Boolean.hxx>
0024 
0025 
0026 
0027 //! The class BOPDS_Pave is to store
0028 //! information about vertex on an edge
0029 class BOPDS_Pave 
0030 {
0031 public:
0032 
0033   DEFINE_STANDARD_ALLOC
0034 
0035   
0036 
0037   //! Empty constructor
0038     BOPDS_Pave();
0039 
0040   //! Modifier
0041   //! Sets the index of vertex <theIndex>
0042     void SetIndex (const Standard_Integer theIndex);
0043   
0044 
0045   //! Selector
0046   //! Returns the index of vertex
0047     Standard_Integer Index() const;
0048   
0049 
0050   //! Modifier
0051   //! Sets the parameter of vertex <theParameter>
0052     void SetParameter (const Standard_Real theParameter);
0053   
0054 
0055   //! Selector
0056   //! Returns the parameter of vertex
0057     Standard_Real Parameter() const;
0058   
0059 
0060   //! Selector
0061   //! Returns the index of vertex <theIndex>
0062   //! Returns the parameter of vertex <theParameter>
0063     void Contents (Standard_Integer& theIndex, Standard_Real& theParameter) const;
0064   
0065 
0066   //! Query
0067   //! Returns true if thr parameter od this is less
0068   //! than the parameter of  <theOther>
0069     Standard_Boolean IsLess (const BOPDS_Pave& theOther) const;
0070   Standard_Boolean operator < (const BOPDS_Pave& theOther) const
0071 {
0072   return IsLess(theOther);
0073 }
0074   
0075 
0076   //! Query
0077   //! Returns true if thr parameter od this is equal
0078   //! to the parameter of  <theOther>
0079     Standard_Boolean IsEqual (const BOPDS_Pave& theOther) const;
0080   Standard_Boolean operator == (const BOPDS_Pave& theOther) const
0081 {
0082   return IsEqual(theOther);
0083 }
0084   
0085   Standard_EXPORT void Dump() const;
0086 
0087 
0088 
0089 
0090 protected:
0091 
0092 
0093 
0094   Standard_Integer myIndex;
0095   Standard_Real myParameter;
0096 
0097 
0098 private:
0099 
0100 
0101 
0102 
0103 
0104 };
0105 
0106 namespace std
0107 {
0108   template <>
0109   struct hash<BOPDS_Pave>
0110   {
0111     size_t operator()(const BOPDS_Pave& thePave) const noexcept
0112     {
0113       size_t aCombination[2];
0114       aCombination[0] = opencascade::hash(thePave.Index());
0115       aCombination[1] = opencascade::hash(thePave.Parameter());
0116       return opencascade::hashBytes(aCombination, sizeof(aCombination));
0117     }
0118   };
0119 }
0120 
0121 #include <BOPDS_Pave.lxx>
0122 
0123 
0124 
0125 
0126 
0127 #endif // _BOPDS_Pave_HeaderFile