1 -- Created on: 2000-08-17
2 -- Created by: Vincent DELOS
3 -- Copyright (c) 2000-2012 OPEN CASCADE SAS
5 -- The content of this file is subject to the Open CASCADE Technology Public
6 -- License Version 6.5 (the "License"). You may not use the content of this file
7 -- except in compliance with the License. Please obtain a copy of the License
8 -- at http://www.opencascade.org and read it completely before using this file.
10 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 -- The Original Code and all software distributed under the License is
14 -- distributed on an "AS IS" basis, without warranty of any kind, and the
15 -- Initial Developer hereby disclaims all such warranties, including without
16 -- limitation, any warranties of merchantability, fitness for a particular
17 -- purpose or non-infringement. Please see the License for the specific terms
18 -- and conditions governing the rights and limitations under the License.
22 class AncestorsSeqAndSuccessorsSeq from BooleanOperations
24 ---Purpose: provide all the ancestors and successors of a --
25 -- given shape. Exemple : for an edge the ancestors
26 -- -- are the wires that hold it and the successors
27 -- are -- its vertices. As we don't know the number
28 -- of -- ancestors of a given shape we first put them
29 -- in a -- sequence of integers (our data structure
30 -- -- defining the shapes does not have back
31 -- pointers). Then we transfer these data in the
32 -- class AncestorsAndSuccessors.
35 Orientation from TopAbs,
36 SequenceOfInteger from TColStd,
37 AncestorsAndSuccessors from BooleanOperations
41 Create returns AncestorsSeqAndSuccessorsSeq from BooleanOperations;
45 ---Purpose: to display the fields.
52 GetAncestor (me; AncestorIndex: Integer) returns Integer;
54 GetSuccessor (me; SuccessorIndex: Integer) returns Integer;
56 GetOrientation(me; OrientationIndex: Integer) returns Orientation;
59 NumberOfAncestors (me) returns Integer;
61 NumberOfSuccessors (me) returns Integer;
64 SetNewAncestor (me:in out; AncestorNumber: Integer);
66 ---Purpose: appends AncestorNumber in the sequence.
67 SetNewSuccessor (me:in out; SuccessorNumber: Integer);
69 ---Purpose: appends SuccessorNumber in the array refering to <mySuccessorsInserted>.
70 SetNewOrientation(me:in out; theOrientation: Orientation);
72 ---Purpose: appends SuccessorNumber in the array refering to <mySuccessorsInserted>.
77 myAncestors: SequenceOfInteger;
78 ---Purpose: the sequence containing all the ancestors of our given shape.
80 mySuccessors: SequenceOfInteger;
81 ---Purpose: the array containing all the successors.
83 myOrientations:SequenceOfInteger;
84 ---Purpose: the array containing all orientations corresponding to the successors.
86 end AncestorsSeqAndSuccessorsSeq;