summaryrefslogtreecommitdiff
path: root/src/V3d/V3d_ListOfTransient.cxx
blob: 1e030c65d8eeb2575926e67c2cd1e26d3e867ce5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <TColStd_ListOfTransient.hxx>
#include <V3d_ListOfTransient.ixx>
#include <TColStd_ListIteratorOfListOfTransient.hxx>

V3d_ListOfTransient::V3d_ListOfTransient():TColStd_ListOfTransient() {}

Standard_Boolean V3d_ListOfTransient::Contains(const Handle(Standard_Transient)& aTransient) const {
  if(IsEmpty()) return Standard_False;
  TColStd_ListIteratorOfListOfTransient i(*this);
  Standard_Boolean found = Standard_False;
  for(; i.More() && !found; i.Next()) {
    found = i.Value() == aTransient;
  }
  return found;
}

void V3d_ListOfTransient::Remove(const Handle(Standard_Transient)& aTransient){


  if(!IsEmpty()){
    TColStd_ListIteratorOfListOfTransient i(*this);
    Standard_Boolean found = Standard_False;
    while(i.More() && !found)
      if( i.Value() == aTransient ) {
	TColStd_ListOfTransient::Remove(i);}
      else {
	i.Next();}
  }
}