mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-06 18:26:22 +03:00
0024858: Convert class V3d_ListOfTransient to non-CDL
Class V3d_ListOfTransient converted to non-CDL form (pure HXX)
This commit is contained in:
parent
5546828378
commit
db3cb1cede
@ -12,3 +12,4 @@ V3d_View_Print.cxx
|
|||||||
V3d_View_5.cxx
|
V3d_View_5.cxx
|
||||||
V3d_Plane.hxx
|
V3d_Plane.hxx
|
||||||
V3d_Plane.cxx
|
V3d_Plane.cxx
|
||||||
|
V3d_ListOfTransient.hxx
|
||||||
|
@ -207,7 +207,7 @@ is
|
|||||||
---Category: Instantiated classes
|
---Category: Instantiated classes
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
private class ListOfTransient;
|
imported ListOfTransient;
|
||||||
|
|
||||||
pointer ViewerPointer to Viewer from V3d;
|
pointer ViewerPointer to Viewer from V3d;
|
||||||
pointer ViewPointer to View from V3d;
|
pointer ViewPointer to View from V3d;
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
-- Created on: 1995-05-17
|
|
||||||
-- Created by: Mister rmi
|
|
||||||
-- Copyright (c) 1995-1999 Matra Datavision
|
|
||||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
|
||||||
--
|
|
||||||
-- This file is part of Open CASCADE Technology software library.
|
|
||||||
--
|
|
||||||
-- This library is free software; you can redistribute it and/or modify it under
|
|
||||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
|
||||||
-- by the Free Software Foundation, with special exception defined in the file
|
|
||||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
|
||||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
|
||||||
--
|
|
||||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
|
||||||
-- commercial license or contractual agreement.
|
|
||||||
|
|
||||||
private class ListOfTransient from V3d inherits ListOfTransient from TColStd
|
|
||||||
|
|
||||||
is
|
|
||||||
|
|
||||||
Create returns ListOfTransient from V3d;
|
|
||||||
|
|
||||||
Contains(me; aTransient: Transient from Standard)
|
|
||||||
returns Boolean from Standard
|
|
||||||
is static;
|
|
||||||
|
|
||||||
Remove(me: in out; aTransient: Transient from Standard)
|
|
||||||
is static;
|
|
||||||
|
|
||||||
|
|
||||||
end ListOfTransient from V3d;
|
|
@ -1,42 +0,0 @@
|
|||||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
|
||||||
//
|
|
||||||
// This file is part of Open CASCADE Technology software library.
|
|
||||||
//
|
|
||||||
// This library is free software; you can redistribute it and/or modify it under
|
|
||||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
|
||||||
// by the Free Software Foundation, with special exception defined in the file
|
|
||||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
|
||||||
// distribution for complete text of the license and disclaimer of any warranty.
|
|
||||||
//
|
|
||||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
|
||||||
// commercial license or contractual agreement.
|
|
||||||
|
|
||||||
#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();}
|
|
||||||
}
|
|
||||||
}
|
|
52
src/V3d/V3d_ListOfTransient.hxx
Normal file
52
src/V3d/V3d_ListOfTransient.hxx
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
// Created on: 1995-05-17
|
||||||
|
// Created by: Mister rmi
|
||||||
|
// Copyright (c) 1995-1999 Matra Datavision
|
||||||
|
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// This file is part of Open CASCADE Technology software library.
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or modify it under
|
||||||
|
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||||
|
// by the Free Software Foundation, with special exception defined in the file
|
||||||
|
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||||
|
// distribution for complete text of the license and disclaimer of any warranty.
|
||||||
|
//
|
||||||
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||||
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
|
#ifndef _V3d_ListOfTransient_HeaderFile
|
||||||
|
#define _V3d_ListOfTransient_HeaderFile
|
||||||
|
|
||||||
|
#include <TColStd_ListOfTransient.hxx>
|
||||||
|
#include <TColStd_ListIteratorOfListOfTransient.hxx>
|
||||||
|
|
||||||
|
//! List of transient objects with methods to check presence and remove elements
|
||||||
|
class V3d_ListOfTransient: public TColStd_ListOfTransient
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
//! Return true if theObject is stored in the list
|
||||||
|
Standard_Boolean Contains (const Handle(Standard_Transient)& theObject) const
|
||||||
|
{
|
||||||
|
for (TColStd_ListIteratorOfListOfTransient it (*this); it.More(); it.Next())
|
||||||
|
{
|
||||||
|
if (it.Value() == theObject)
|
||||||
|
return Standard_True;
|
||||||
|
}
|
||||||
|
return Standard_False;
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Remove all elements equal to theObject from the list
|
||||||
|
void Remove (const Handle(Standard_Transient)& theObject)
|
||||||
|
{
|
||||||
|
for (TColStd_ListIteratorOfListOfTransient it (*this); it.More();)
|
||||||
|
{
|
||||||
|
if (it.Value() == theObject)
|
||||||
|
TColStd_ListOfTransient::Remove (it);
|
||||||
|
else
|
||||||
|
it.Next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
Loading…
x
Reference in New Issue
Block a user