0030686: Visualization, SelectMgr_ViewerSelector - sorting issues of transformation...
[occt.git] / src / TopOpeBRepDS / TopOpeBRepDS_ListOfShapeOn1State.cxx
CommitLineData
b311480e 1// Created on: 1993-08-31
2// Created by: Jean Yves LEBEY
3// Copyright (c) 1993-1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 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
973c2be1 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.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
7fd59977 17
18#include <Standard_ProgramError.hxx>
42cf5bc1 19#include <TopOpeBRepDS_ListOfShapeOn1State.hxx>
7fd59977 20
21//=======================================================================
22//function : TopOpeBRepDS_ListOfShapeOn1State
23//purpose :
24//=======================================================================
7fd59977 25TopOpeBRepDS_ListOfShapeOn1State::TopOpeBRepDS_ListOfShapeOn1State()
26: mySplits(0)
27{
28}
29
30//=======================================================================
31//function : ListOnState
32//purpose :
33//=======================================================================
34
35const TopTools_ListOfShape& TopOpeBRepDS_ListOfShapeOn1State::ListOnState
36() const
37{
38 return myList;
39}
40
41//=======================================================================
42//function : ChangeListOnState
43//purpose :
44//=======================================================================
45
46TopTools_ListOfShape& TopOpeBRepDS_ListOfShapeOn1State::ChangeListOnState
47()
48{
49 return myList;
50}
51
52//=======================================================================
53//function : Clear
54//purpose :
55//=======================================================================
56
57void TopOpeBRepDS_ListOfShapeOn1State::Clear()
58{
59 myList.Clear();
60 mySplits = 0;
61}
62
63//=======================================================================
64//function : IsSplit
65//purpose :
66//=======================================================================
67
68Standard_Boolean TopOpeBRepDS_ListOfShapeOn1State::IsSplit
69() const
70{
71 Standard_Boolean res = Standard_False;
72 if (mySplits & 1) res = Standard_True;
73 return res;
74}
75
76//=======================================================================
77//function : Split
78//purpose :
79//=======================================================================
80
81void TopOpeBRepDS_ListOfShapeOn1State::Split
82(const Standard_Boolean B)
83{
84 Standard_Integer mask = 1;
85 if (B) mySplits |= mask;
86 else mySplits &= ~mask;
87}