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

http://pythonocc.googlecode.com/ · C++ Header · 144 lines · 56 code · 55 blank · 33 comment · 1 complexity · ef0325509feb6cd4ca3dcee1afc0ec46 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_CommonBlock_HeaderFile
  23. #define _NMTTools_CommonBlock_HeaderFile
  24. #ifndef _BOPTools_ListOfPaveBlock_HeaderFile
  25. #include <BOPTools_ListOfPaveBlock.hxx>
  26. #endif
  27. #ifndef _TColStd_ListOfInteger_HeaderFile
  28. #include <TColStd_ListOfInteger.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 BOPTools_PaveBlock;
  37. class TColStd_ListOfInteger;
  38. class BOPTools_ListOfPaveBlock;
  39. #ifndef _Standard_HeaderFile
  40. #include <Standard.hxx>
  41. #endif
  42. #ifndef _Standard_Macro_HeaderFile
  43. #include <Standard_Macro.hxx>
  44. #endif
  45. class NMTTools_CommonBlock {
  46. public:
  47. void* operator new(size_t,void* anAddress)
  48. {
  49. return anAddress;
  50. }
  51. void* operator new(size_t size)
  52. {
  53. return Standard::Allocate(size);
  54. }
  55. void operator delete(void *anAddress)
  56. {
  57. if (anAddress) Standard::Free((Standard_Address&)anAddress);
  58. }
  59. // Methods PUBLIC
  60. //
  61. Standard_EXPORT NMTTools_CommonBlock();
  62. Standard_EXPORT void AddPaveBlock(const BOPTools_PaveBlock& aPB) ;
  63. Standard_EXPORT void AddFace(const Standard_Integer aF) ;
  64. Standard_EXPORT void AddFaces(const TColStd_ListOfInteger& aLF) ;
  65. Standard_EXPORT const BOPTools_ListOfPaveBlock& PaveBlocks() const;
  66. Standard_EXPORT const TColStd_ListOfInteger& Faces() const;
  67. Standard_EXPORT const BOPTools_PaveBlock& PaveBlock1() const;
  68. Standard_EXPORT BOPTools_PaveBlock& PaveBlock1(const Standard_Integer anIx) ;
  69. Standard_EXPORT BOPTools_PaveBlock& PaveBlockOnEdge(const Standard_Integer anIndex) ;
  70. Standard_EXPORT Standard_Boolean IsPaveBlockOnFace(const Standard_Integer anIndex) const;
  71. Standard_EXPORT Standard_Boolean IsPaveBlockOnEdge(const Standard_Integer anIndex) const;
  72. Standard_EXPORT Standard_Boolean IsEqual(const NMTTools_CommonBlock& aCB) const;
  73. Standard_EXPORT Standard_Boolean Contains(const BOPTools_PaveBlock& aPB) const;
  74. protected:
  75. // Methods PROTECTED
  76. //
  77. // Fields PROTECTED
  78. //
  79. BOPTools_ListOfPaveBlock myPaveBlocks;
  80. TColStd_ListOfInteger myFaces;
  81. private:
  82. // Methods PRIVATE
  83. //
  84. // Fields PRIVATE
  85. //
  86. };
  87. // other Inline functions and methods (like "C++: function call" methods)
  88. //
  89. #endif