Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-24 09:15:08

0001 // Created by: Peter KURNEV
0002 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014 
0015 #ifndef BOPTools_ConnexityBlock_HeaderFile
0016 #define BOPTools_ConnexityBlock_HeaderFile
0017 
0018 #include <NCollection_BaseAllocator.hxx>
0019 #include <TopoDS_Shape.hxx>
0020 #include <NCollection_List.hxx>
0021 
0022 //=================================================================================================
0023 
0024 class BOPTools_ConnexityBlock
0025 {
0026 public:
0027   BOPTools_ConnexityBlock()
0028       : myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
0029         myRegular(true),
0030         myShapes(myAllocator),
0031         myLoops(myAllocator) {};
0032   //
0033   BOPTools_ConnexityBlock(const occ::handle<NCollection_BaseAllocator>& theAllocator)
0034       : myAllocator(theAllocator),
0035         myRegular(true),
0036         myShapes(myAllocator),
0037         myLoops(myAllocator) {};
0038 
0039   //
0040   const NCollection_List<TopoDS_Shape>& Shapes() const { return myShapes; };
0041 
0042   //
0043   NCollection_List<TopoDS_Shape>& ChangeShapes() { return myShapes; };
0044 
0045   //
0046   void SetRegular(const bool theFlag) { myRegular = theFlag; }
0047 
0048   //
0049   bool IsRegular() const { return myRegular; }
0050 
0051   //
0052   const NCollection_List<TopoDS_Shape>& Loops() const { return myLoops; };
0053 
0054   //
0055   NCollection_List<TopoDS_Shape>& ChangeLoops() { return myLoops; };
0056 
0057   //
0058 protected:
0059   occ::handle<NCollection_BaseAllocator> myAllocator;
0060   bool                                   myRegular;
0061   NCollection_List<TopoDS_Shape>         myShapes;
0062   NCollection_List<TopoDS_Shape>         myLoops;
0063 };
0064 
0065 #endif