1 -- Created on: 1995-10-26
2 -- Created by: Yves FRICAUD
3 -- Copyright (c) 1995-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 class AsDes from BRepAlgo inherits TShared from MMgt
19 ---Purpose: SD to store descendants and ascendants of Shapes.
22 DataMapOfShapeListOfShape from TopTools,
23 ListOfShape from TopTools,
27 ConstructionError from Standard
30 Create returns AsDes from BRepAlgo;
31 ---Purpose: Creates an empty AsDes.
35 Add (me : mutable ; S : Shape from TopoDS;
36 SS : Shape from TopoDS)
37 ---Purpose: Stores <SS> as a futur subshape of <S>.
40 Add (me : mutable ; S : Shape from TopoDS;
41 SS : ListOfShape from TopTools)
42 ---Purpose: Stores <SS> as futurs SubShapes of <S>.
45 HasAscendant(me; S : Shape from TopoDS)
46 returns Boolean from Standard;
48 HasDescendant(me; S : Shape from TopoDS)
49 returns Boolean from Standard;
51 Ascendant (me; S : Shape from TopoDS)
52 ---Purpose: Returns the Shape containing <S>.
53 ---C++: return const &
54 returns ListOfShape from TopTools;
56 Descendant (me; S : Shape from TopoDS)
57 ---Purpose: Returns futur subhapes of <S>.
58 ---C++: return const &
59 returns ListOfShape from TopTools;
61 ChangeDescendant (me : mutable; S : Shape from TopoDS)
62 ---Purpose: Returns futur subhapes of <S>.
64 returns ListOfShape from TopTools;
66 Replace ( me : mutable; OldS, NewS : Shape from TopoDS)
67 ---Purpose: Replace <OldS> by <NewS>.
68 -- <OldS> disapear from <me>.
72 S : Shape from TopoDS)
73 ---Purpose: Remove <S> from me.
75 ConstructionError -- if <S> HasDescendant.
78 HasCommonDescendant (me ;
79 S1 : Shape from TopoDS;
80 S2 : Shape from TopoDS;
81 LC : in out ListOfShape from TopTools)
82 ---Purpose: Returns True if (S1> and <S2> has common
83 -- Descendants. Stores in <LC> the Commons Descendants.
84 returns Boolean from Standard;
86 BackReplace ( me : mutable;
87 OldS : Shape from TopoDS;
88 NewS : Shape from TopoDS;
89 L : ListOfShape from TopTools;
90 InUp : Boolean from Standard)
91 ---Purpose: Replace <OldS> by <NewS>.
92 -- <OldS> disapear from <me>.
98 up : DataMapOfShapeListOfShape from TopTools;
99 down : DataMapOfShapeListOfShape from TopTools;