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

http://pythonocc.googlecode.com/ · C++ Header · 126 lines · 49 code · 39 blank · 38 comment · 1 complexity · 52c216758298203e31909962a47bfade 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 _NMTTools_CommonBlockAPI_HeaderFile
  23. #define _NMTTools_CommonBlockAPI_HeaderFile
  24. #ifndef _Standard_Address_HeaderFile
  25. #include <Standard_Address.hxx>
  26. #endif
  27. #ifndef _BOPTools_ListOfPaveBlock_HeaderFile
  28. #include <BOPTools_ListOfPaveBlock.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 NMTTools_ListOfCommonBlock;
  37. class BOPTools_ListOfPaveBlock;
  38. class BOPTools_PaveBlock;
  39. class NMTTools_CommonBlock;
  40. #ifndef _Standard_HeaderFile
  41. #include <Standard.hxx>
  42. #endif
  43. #ifndef _Standard_Macro_HeaderFile
  44. #include <Standard_Macro.hxx>
  45. #endif
  46. class NMTTools_CommonBlockAPI {
  47. public:
  48. void* operator new(size_t,void* anAddress)
  49. {
  50. return anAddress;
  51. }
  52. void* operator new(size_t size)
  53. {
  54. return Standard::Allocate(size);
  55. }
  56. void operator delete(void *anAddress)
  57. {
  58. if (anAddress) Standard::Free((Standard_Address&)anAddress);
  59. }
  60. // Methods PUBLIC
  61. //
  62. Standard_EXPORT NMTTools_CommonBlockAPI(const NMTTools_ListOfCommonBlock& aList);
  63. //! Selector <br>
  64. Standard_EXPORT const NMTTools_ListOfCommonBlock& List() const;
  65. //! Returns all PaveBlock-s (from the list) that are <br>
  66. //! common for the given edge with DS-index <anE> <br>
  67. Standard_EXPORT const BOPTools_ListOfPaveBlock& CommonPaveBlocks(const Standard_Integer anE) const;
  68. //! Returns TRUE if given PaveBlock <aPB> is <br>
  69. //! common for the Blocks from the list <br>
  70. Standard_EXPORT Standard_Boolean IsCommonBlock(const BOPTools_PaveBlock& aPB) const;
  71. Standard_EXPORT NMTTools_CommonBlock& CommonBlock(const BOPTools_PaveBlock& aPB) const;
  72. protected:
  73. // Methods PROTECTED
  74. //
  75. // Fields PROTECTED
  76. //
  77. private:
  78. // Methods PRIVATE
  79. //
  80. // Fields PRIVATE
  81. //
  82. Standard_Address myListOfCommonBlock;
  83. BOPTools_ListOfPaveBlock myListOfPaveBlock;
  84. };
  85. // other Inline functions and methods (like "C++: function call" methods)
  86. //
  87. #endif