0021762: Integration of new Boolean Operation algorithm to OCCT.
[occt.git] / src / BOPTools / BOPTools_ConnexityBlock.hxx
CommitLineData
4e57c75e 1// Created by: Peter KURNEV
2// Copyright (c) 1999-2012 OPEN CASCADE SAS
3//
4// The content of this file is subject to the Open CASCADE Technology Public
5// License Version 6.5 (the "License"). You may not use the content of this file
6// except in compliance with the License. Please obtain a copy of the License
7// at http://www.opencascade.org and read it completely before using this file.
8//
9// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11//
12// The Original Code and all software distributed under the License is
13// distributed on an "AS IS" basis, without warranty of any kind, and the
14// Initial Developer hereby disclaims all such warranties, including without
15// limitation, any warranties of merchantability, fitness for a particular
16// purpose or non-infringement. Please see the License for the specific terms
17// and conditions governing the rights and limitations under the License.
18
19
20#ifndef BOPTools_ConnexityBlock_HeaderFile
21#define BOPTools_ConnexityBlock_HeaderFile
22
23#ifndef _Standard_HeaderFile
24#include <Standard.hxx>
25#endif
26#ifndef _Standard_Macro_HeaderFile
27#include <Standard_Macro.hxx>
28#endif
29
30#include <NCollection_BaseAllocator.hxx>
31#include <BOPCol_ListOfShape.hxx>
32
33//=======================================================================
34//class : ConnexityBlock
35//purpose :
36//=======================================================================
37class BOPTools_ConnexityBlock {
38 public:
39 BOPTools_ConnexityBlock() :
40 myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
41 myRegular(Standard_True),
42 myShapes(myAllocator),
43 myLoops(myAllocator) {
44 };
45 //
46 BOPTools_ConnexityBlock(const Handle(NCollection_BaseAllocator)& theAllocator):
47 myRegular(Standard_True),
48 myAllocator(theAllocator),
49 myShapes(myAllocator),
50 myLoops(myAllocator) {
51 };
52 //
53 const BOPCol_ListOfShape& Shapes()const {
54 return myShapes;
55 };
56 //
57 BOPCol_ListOfShape& ChangeShapes() {
58 return myShapes;
59 };
60 //
61 void SetRegular(const Standard_Boolean theFlag) {
62 myRegular=theFlag;
63 }
64 //
65 Standard_Boolean IsRegular()const {
66 return myRegular;
67 }
68 //
69 const BOPCol_ListOfShape& Loops()const {
70 return myLoops;
71 };
72 //
73 BOPCol_ListOfShape& ChangeLoops() {
74 return myLoops;
75 };
76 //
77 protected:
78 Standard_Boolean myRegular;
79 Handle(NCollection_BaseAllocator) myAllocator;
80 BOPCol_ListOfShape myShapes;
81 BOPCol_ListOfShape myLoops;
82};
83
84
85#endif