/src/contrib/geom-5.1.2.7/inc_pythonocc/GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx

http://pythonocc.googlecode.com/ · C++ Header · 172 lines · 76 code · 63 blank · 33 comment · 1 complexity · d8732ce0e929162b0795b04e143f7b74 MD5 · raw file

  1. // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
  2. //
  3. // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
  4. // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
  5. //
  6. // This library is free software; you can redistribute it and/or
  7. // modify it under the terms of the GNU Lesser General Public
  8. // License as published by the Free Software Foundation; either
  9. // version 2.1 of the License.
  10. //
  11. // This library is distributed in the hope that it will be useful,
  12. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. // Lesser General Public License for more details.
  15. //
  16. // You should have received a copy of the GNU Lesser General Public
  17. // License along with this library; if not, write to the Free Software
  18. // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. //
  20. // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
  21. //
  22. #ifndef _GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile
  23. #define _GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile
  24. #ifndef _TCollection_BasicMap_HeaderFile
  25. #include <TCollection_BasicMap.hxx>
  26. #endif
  27. #ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_HeaderFile
  28. #include <Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx>
  29. #endif
  30. #ifndef _Standard_Integer_HeaderFile
  31. #include <Standard_Integer.hxx>
  32. #endif
  33. #ifndef _Standard_Boolean_HeaderFile
  34. #include <Standard_Boolean.hxx>
  35. #endif
  36. class Standard_DomainError;
  37. class Standard_OutOfRange;
  38. class Standard_NoSuchObject;
  39. class TopoDS_Shape;
  40. class GEOMAlgo_ShapeInfo;
  41. class TopTools_ShapeMapHasher;
  42. class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo;
  43. #ifndef _Standard_HeaderFile
  44. #include <Standard.hxx>
  45. #endif
  46. #ifndef _Standard_Macro_HeaderFile
  47. #include <Standard_Macro.hxx>
  48. #endif
  49. class GEOMAlgo_IndexedDataMapOfShapeShapeInfo : public TCollection_BasicMap {
  50. public:
  51. void* operator new(size_t,void* anAddress)
  52. {
  53. return anAddress;
  54. }
  55. void* operator new(size_t size)
  56. {
  57. return Standard::Allocate(size);
  58. }
  59. void operator delete(void *anAddress)
  60. {
  61. if (anAddress) Standard::Free((Standard_Address&)anAddress);
  62. }
  63. // Methods PUBLIC
  64. //
  65. Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeShapeInfo(const Standard_Integer NbBuckets = 1);
  66. Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeShapeInfo& Assign(const GEOMAlgo_IndexedDataMapOfShapeShapeInfo& Other) ;
  67. GEOMAlgo_IndexedDataMapOfShapeShapeInfo& operator =(const GEOMAlgo_IndexedDataMapOfShapeShapeInfo& Other)
  68. {
  69. return Assign(Other);
  70. }
  71. Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
  72. Standard_EXPORT void Clear() ;
  73. ~GEOMAlgo_IndexedDataMapOfShapeShapeInfo()
  74. {
  75. Clear();
  76. }
  77. Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const GEOMAlgo_ShapeInfo& I) ;
  78. Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const GEOMAlgo_ShapeInfo& T) ;
  79. Standard_EXPORT void RemoveLast() ;
  80. Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const;
  81. Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const;
  82. Standard_EXPORT const GEOMAlgo_ShapeInfo& FindFromIndex(const Standard_Integer I) const;
  83. const GEOMAlgo_ShapeInfo& operator ()(const Standard_Integer I) const
  84. {
  85. return FindFromIndex(I);
  86. }
  87. Standard_EXPORT GEOMAlgo_ShapeInfo& ChangeFromIndex(const Standard_Integer I) ;
  88. GEOMAlgo_ShapeInfo& operator ()(const Standard_Integer I)
  89. {
  90. return ChangeFromIndex(I);
  91. }
  92. Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const;
  93. Standard_EXPORT const GEOMAlgo_ShapeInfo& FindFromKey(const TopoDS_Shape& K) const;
  94. Standard_EXPORT GEOMAlgo_ShapeInfo& ChangeFromKey(const TopoDS_Shape& K) ;
  95. protected:
  96. // Methods PROTECTED
  97. //
  98. // Fields PROTECTED
  99. //
  100. private:
  101. // Methods PRIVATE
  102. //
  103. Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeShapeInfo(const GEOMAlgo_IndexedDataMapOfShapeShapeInfo& Other);
  104. // Fields PRIVATE
  105. //
  106. };
  107. // other Inline functions and methods (like "C++: function call" methods)
  108. //
  109. #endif