/src/contrib/geom-6.3.1.8/inc/GEOMAlgo_BuilderShape.hxx

https://gitlab.com/tylerluo/pythonocc · C++ Header · 152 lines · 65 code · 39 blank · 48 comment · 1 complexity · 40f0216a2df07fd12cc7ae8e7f9da5aa 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_BuilderShape_HeaderFile
  23. #define _GEOMAlgo_BuilderShape_HeaderFile
  24. #ifndef _TopoDS_Shape_HeaderFile
  25. #include <TopoDS_Shape.hxx>
  26. #endif
  27. #ifndef _TopTools_ListOfShape_HeaderFile
  28. #include <TopTools_ListOfShape.hxx>
  29. #endif
  30. #ifndef _TopTools_MapOfShape_HeaderFile
  31. #include <TopTools_MapOfShape.hxx>
  32. #endif
  33. #ifndef _Standard_Boolean_HeaderFile
  34. #include <Standard_Boolean.hxx>
  35. #endif
  36. #ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile
  37. #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
  38. #endif
  39. #ifndef _GEOMAlgo_Algo_HeaderFile
  40. #include <GEOMAlgo_Algo.hxx>
  41. #endif
  42. class TopoDS_Shape;
  43. class TopTools_ListOfShape;
  44. class TopTools_IndexedDataMapOfShapeListOfShape;
  45. #ifndef _Standard_HeaderFile
  46. #include <Standard.hxx>
  47. #endif
  48. #ifndef _Standard_Macro_HeaderFile
  49. #include <Standard_Macro.hxx>
  50. #endif
  51. //! Root class for algorithms that has shape as result <br>
  52. class GEOMAlgo_BuilderShape : public GEOMAlgo_Algo {
  53. public:
  54. void* operator new(size_t,void* anAddress)
  55. {
  56. return anAddress;
  57. }
  58. void* operator new(size_t size)
  59. {
  60. return Standard::Allocate(size);
  61. }
  62. void operator delete(void *anAddress)
  63. {
  64. if (anAddress) Standard::Free((Standard_Address&)anAddress);
  65. }
  66. // Methods PUBLIC
  67. //
  68. //! Returns the result of algorithm <br>
  69. Standard_EXPORT const TopoDS_Shape& Shape() const;
  70. //! Returns the list of shapes generated from the <br>
  71. //! shape theS. <br>
  72. Standard_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
  73. //! Returns the list of shapes modified from the <br>
  74. //! shape theS. <br>
  75. Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
  76. //! Returns true if the shape theS has been deleted. <br>
  77. Standard_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
  78. //! Returns true if the at least one shape(or subshape) <br>
  79. //! of arguments has been deleted. <br>
  80. Standard_EXPORT Standard_Boolean HasDeleted() const;
  81. //! Returns true if the at least one shape(or subshape) <br>
  82. //! of arguments has generated shapes. <br>
  83. Standard_EXPORT Standard_Boolean HasGenerated() const;
  84. //! Returns true if the at least one shape(or subshape) <br>
  85. //! of arguments has modified shapes. <br>
  86. Standard_EXPORT Standard_Boolean HasModified() const;
  87. Standard_EXPORT const TopTools_IndexedDataMapOfShapeListOfShape& ImagesResult() const;
  88. protected:
  89. // Methods PROTECTED
  90. //
  91. //! Empty constructor <br>
  92. Standard_EXPORT GEOMAlgo_BuilderShape();
  93. Standard_EXPORT virtual ~GEOMAlgo_BuilderShape();
  94. //! Prepare information for history support <br>
  95. Standard_EXPORT virtual void PrepareHistory() ;
  96. // Fields PROTECTED
  97. //
  98. TopoDS_Shape myShape;
  99. TopTools_ListOfShape myHistShapes;
  100. TopTools_MapOfShape myMapShape;
  101. Standard_Boolean myHasDeleted;
  102. Standard_Boolean myHasGenerated;
  103. Standard_Boolean myHasModified;
  104. TopTools_IndexedDataMapOfShapeListOfShape myImagesResult;
  105. private:
  106. // Methods PRIVATE
  107. //
  108. // Fields PRIVATE
  109. //
  110. };
  111. // other Inline functions and methods (like "C++: function call" methods)
  112. //
  113. #endif