0024428: Implementation of LGPL license
[occt.git] / src / BOPTools / BOPTools_ConnexityBlock.hxx
CommitLineData
4e57c75e 1// Created by: Peter KURNEV
973c2be1 2// Copyright (c) 1999-2014 OPEN CASCADE SAS
4e57c75e 3//
973c2be1 4// This file is part of Open CASCADE Technology software library.
4e57c75e 5//
973c2be1 6// This library is free software; you can redistribute it and / or modify it
7// under the terms of the GNU Lesser General Public version 2.1 as published
8// by the Free Software Foundation, with special exception defined in the file
9// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10// distribution for complete text of the license and disclaimer of any warranty.
4e57c75e 11//
973c2be1 12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
4e57c75e 14
15#ifndef BOPTools_ConnexityBlock_HeaderFile
16#define BOPTools_ConnexityBlock_HeaderFile
17
18#ifndef _Standard_HeaderFile
19#include <Standard.hxx>
20#endif
21#ifndef _Standard_Macro_HeaderFile
22#include <Standard_Macro.hxx>
23#endif
24
25#include <NCollection_BaseAllocator.hxx>
26#include <BOPCol_ListOfShape.hxx>
27
28//=======================================================================
29//class : ConnexityBlock
30//purpose :
31//=======================================================================
32class BOPTools_ConnexityBlock {
33 public:
34 BOPTools_ConnexityBlock() :
35 myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
36 myRegular(Standard_True),
37 myShapes(myAllocator),
38 myLoops(myAllocator) {
39 };
40 //
41 BOPTools_ConnexityBlock(const Handle(NCollection_BaseAllocator)& theAllocator):
2f6cb3ac 42 myAllocator(theAllocator),
43 myRegular(Standard_True),
4e57c75e 44 myShapes(myAllocator),
45 myLoops(myAllocator) {
46 };
47 //
48 const BOPCol_ListOfShape& Shapes()const {
49 return myShapes;
50 };
51 //
52 BOPCol_ListOfShape& ChangeShapes() {
53 return myShapes;
54 };
55 //
56 void SetRegular(const Standard_Boolean theFlag) {
57 myRegular=theFlag;
58 }
59 //
60 Standard_Boolean IsRegular()const {
61 return myRegular;
62 }
63 //
64 const BOPCol_ListOfShape& Loops()const {
65 return myLoops;
66 };
67 //
68 BOPCol_ListOfShape& ChangeLoops() {
69 return myLoops;
70 };
71 //
72 protected:
4e57c75e 73 Handle(NCollection_BaseAllocator) myAllocator;
eafb234b 74 Standard_Boolean myRegular;
4e57c75e 75 BOPCol_ListOfShape myShapes;
76 BOPCol_ListOfShape myLoops;
77};
78
79
80#endif