0025137: The methods "Convert" point defined in the reference frame of the view into...
[occt.git] / src / V3d / V3d_ListOfTransient.hxx
CommitLineData
db3cb1ce 1// Created on: 1995-05-17
2// Created by: Mister rmi
3// Copyright (c) 1995-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _V3d_ListOfTransient_HeaderFile
18#define _V3d_ListOfTransient_HeaderFile
19
20#include <TColStd_ListOfTransient.hxx>
21#include <TColStd_ListIteratorOfListOfTransient.hxx>
22
23//! List of transient objects with methods to check presence and remove elements
24class V3d_ListOfTransient: public TColStd_ListOfTransient
25{
26public:
27
28 //! Return true if theObject is stored in the list
29 Standard_Boolean Contains (const Handle(Standard_Transient)& theObject) const
30 {
31 for (TColStd_ListIteratorOfListOfTransient it (*this); it.More(); it.Next())
32 {
33 if (it.Value() == theObject)
34 return Standard_True;
35 }
36 return Standard_False;
37 }
38
39 //! Remove all elements equal to theObject from the list
40 void Remove (const Handle(Standard_Transient)& theObject)
41 {
42 for (TColStd_ListIteratorOfListOfTransient it (*this); it.More();)
43 {
44 if (it.Value() == theObject)
45 TColStd_ListOfTransient::Remove (it);
46 else
47 it.Next();
48 }
49 }
50};
51
52#endif