1 // Created on: 1997-10-22
2 // Created by: Jean Yves LEBEY
3 // Copyright (c) 1997-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <TopOpeBRepDS_Marker.ixx>
18 #include <TopOpeBRepDS_define.hxx>
19 //#include <TopExp.hxx>
20 //#include <TopTools_IndexedMapOfShape.hxx>
22 TopOpeBRepDS_Marker::TopOpeBRepDS_Marker()
27 void TopOpeBRepDS_Marker::Reset()
33 void TopOpeBRepDS_Marker::Set(const Standard_Integer ie, const Standard_Boolean b)
36 if (!(ie>=1 && ie<=myne)) return;
40 void TopOpeBRepDS_Marker::Set(const Standard_Boolean b, const Standard_Integer na, const Standard_Address aa)
42 char ** a = (char**)aa;
43 // Standard_Integer ia,ie;
45 if (!na) myhe->Init(b);
46 else for (ia=0; ia<na; ia++) Set(atoi(a[ia]),b);
49 Standard_Boolean TopOpeBRepDS_Marker::GetI(const Standard_Integer ie) const
51 if (myhe.IsNull()) return Standard_False;
52 if (!(ie>=1 && ie<=myne)) return Standard_False;
53 return myhe->Value(ie);
56 void TopOpeBRepDS_Marker::Allocate(const Standard_Integer n)
58 Standard_Boolean all = (n > myne);
59 Standard_Integer nall = n;
61 if (myne == 0) nall = 1000;
62 myhe = new TColStd_HArray1OfBoolean(0,nall);
63 myhe->Init(Standard_False);
65 if (nall) myne = nall;