7fd59977 |
1 | // File: TopOpeBRepDS_ListOfShapeOn1State.cxx |
2 | // Created: Tue Aug 31 15:40:14 1993 |
3 | // Author: Jean Yves LEBEY |
4 | // <jyl@phobox> |
5 | |
6 | #include <TopOpeBRepDS_ListOfShapeOn1State.ixx> |
7 | |
8 | #include <Standard_ProgramError.hxx> |
9 | |
10 | //======================================================================= |
11 | //function : TopOpeBRepDS_ListOfShapeOn1State |
12 | //purpose : |
13 | //======================================================================= |
14 | |
15 | TopOpeBRepDS_ListOfShapeOn1State::TopOpeBRepDS_ListOfShapeOn1State() |
16 | : mySplits(0) |
17 | { |
18 | } |
19 | |
20 | //======================================================================= |
21 | //function : ListOnState |
22 | //purpose : |
23 | //======================================================================= |
24 | |
25 | const TopTools_ListOfShape& TopOpeBRepDS_ListOfShapeOn1State::ListOnState |
26 | () const |
27 | { |
28 | return myList; |
29 | } |
30 | |
31 | //======================================================================= |
32 | //function : ChangeListOnState |
33 | //purpose : |
34 | //======================================================================= |
35 | |
36 | TopTools_ListOfShape& TopOpeBRepDS_ListOfShapeOn1State::ChangeListOnState |
37 | () |
38 | { |
39 | return myList; |
40 | } |
41 | |
42 | //======================================================================= |
43 | //function : Clear |
44 | //purpose : |
45 | //======================================================================= |
46 | |
47 | void TopOpeBRepDS_ListOfShapeOn1State::Clear() |
48 | { |
49 | myList.Clear(); |
50 | mySplits = 0; |
51 | } |
52 | |
53 | //======================================================================= |
54 | //function : IsSplit |
55 | //purpose : |
56 | //======================================================================= |
57 | |
58 | Standard_Boolean TopOpeBRepDS_ListOfShapeOn1State::IsSplit |
59 | () const |
60 | { |
61 | Standard_Boolean res = Standard_False; |
62 | if (mySplits & 1) res = Standard_True; |
63 | return res; |
64 | } |
65 | |
66 | //======================================================================= |
67 | //function : Split |
68 | //purpose : |
69 | //======================================================================= |
70 | |
71 | void TopOpeBRepDS_ListOfShapeOn1State::Split |
72 | (const Standard_Boolean B) |
73 | { |
74 | Standard_Integer mask = 1; |
75 | if (B) mySplits |= mask; |
76 | else mySplits &= ~mask; |
77 | } |