mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0024859: Replace SortTools by STL equivalents
Package SortTools and its derived classes are removed; STL sort algorithms are used instead. Comparator objects are mostly reimplemented as local classes.
This commit is contained in:
@@ -1,3 +1 @@
|
||||
TCollection_Compare.gxx
|
||||
TCollection_CMPLRS.edl
|
||||
TCollection_WOKSteps.edl
|
||||
|
@@ -79,19 +79,6 @@ is
|
||||
|
||||
enumeration Side is Left , Right;
|
||||
|
||||
deferred generic class Compare ;
|
||||
|
||||
private deferred class PrivCompareOfInteger
|
||||
instantiates Compare from TCollection(Integer from Standard);
|
||||
|
||||
private deferred class PrivCompareOfReal
|
||||
instantiates Compare from TCollection(Real from Standard);
|
||||
|
||||
class CompareOfInteger;
|
||||
|
||||
class CompareOfReal;
|
||||
|
||||
|
||||
NextPrimeForMap(I : Integer) returns Integer;
|
||||
---Purpose: Returns a prime number greater than <I> suitable
|
||||
-- to dimension a Map. When <I> becomes great there
|
||||
|
@@ -1,36 +0,0 @@
|
||||
-- Created on: 1998-02-20
|
||||
-- Created by: euclid
|
||||
-- Copyright (c) 1998-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.
|
||||
|
||||
@if ( %DebugMode == "False" ) then
|
||||
|
||||
@if ( %Station == "sun" ) then
|
||||
@set %CMPLRS_CXX_ModeOpt = " -O3 -DNo_Exception ";
|
||||
@endif;
|
||||
|
||||
@if ( %Station == "ao1" ) then
|
||||
@string %CMPLRS_CXX_ModeOpt += " -O3 -DNo_Exception ";
|
||||
@endif;
|
||||
|
||||
@if ( %Station == "sil" ) then
|
||||
@set %CMPLRS_CXX_ModeOpt = " -O2 -DNo_Exception ";
|
||||
@endif;
|
||||
|
||||
@if ( %Station == "hp" ) then
|
||||
@set %CMPLRS_CXX_ModeOpt = " +O3 -DNo_Exception ";
|
||||
@endif;
|
||||
|
||||
@endif;
|
||||
|
@@ -1,49 +0,0 @@
|
||||
-- Created on: 1991-05-14
|
||||
-- Created by: Annick PANCHER
|
||||
-- Copyright (c) 1991-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.
|
||||
|
||||
-- Revised: Mireille MERCIEN
|
||||
|
||||
|
||||
deferred generic class Compare from TCollection ( Item as any )
|
||||
|
||||
---Purpose: Defines a comparison operator which can be used by
|
||||
-- any ordered structure. The way to compare items
|
||||
-- has to be described in subclasses, which inherit
|
||||
-- from instantiations of Compare.
|
||||
|
||||
is
|
||||
|
||||
IsLower (me; Left, Right: Item)
|
||||
---Level: Public
|
||||
---Purpose: returns True if <Left> is lower than <Right>.
|
||||
returns Boolean
|
||||
is virtual;
|
||||
|
||||
IsGreater (me; Left, Right: Item)
|
||||
---Level: Public
|
||||
---Purpose: returns True if <Left> is greater than <Right>.
|
||||
returns Boolean
|
||||
is virtual;
|
||||
|
||||
IsEqual(me; Left, Right: Item)
|
||||
---Level: Public
|
||||
---Purpose: returns True when <Right> and <Left> are equal.
|
||||
returns Boolean
|
||||
is virtual;
|
||||
|
||||
end;
|
||||
|
||||
|
@@ -1,49 +0,0 @@
|
||||
// Created on: 1992-08-27
|
||||
// Created by: Mireille MERCIEN
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1992-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.
|
||||
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
|
||||
// -----------
|
||||
// IsLower :
|
||||
// -----------
|
||||
Standard_Boolean TCollection_Compare::IsLower (const Item& ,
|
||||
const Item& ) const
|
||||
{
|
||||
Standard_NotImplemented::Raise();
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
// -----------
|
||||
// IsGreater :
|
||||
// -----------
|
||||
Standard_Boolean TCollection_Compare::IsGreater (const Item& ,
|
||||
const Item& ) const
|
||||
{
|
||||
Standard_NotImplemented::Raise();
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
// -----------
|
||||
// IsEqual :
|
||||
// -----------
|
||||
Standard_Boolean TCollection_Compare::IsEqual (const Item& Left,
|
||||
const Item& Right) const
|
||||
{
|
||||
return (Left == Right) ;
|
||||
}
|
||||
|
||||
|
@@ -1,37 +0,0 @@
|
||||
-- Created on: 1992-08-27
|
||||
-- Created by: Mireille MERCIEN
|
||||
-- Copyright (c) 1992-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.
|
||||
|
||||
class CompareOfInteger from TCollection
|
||||
inherits
|
||||
PrivCompareOfInteger
|
||||
|
||||
is
|
||||
|
||||
Create ;
|
||||
|
||||
IsLower (me; Left, Right: Integer)
|
||||
---Level: Public
|
||||
---Purpose: Returns True if <Left> is lower than <Right>.
|
||||
returns Boolean
|
||||
is redefined;
|
||||
|
||||
IsGreater (me; Left, Right: Integer)
|
||||
---Level: Public
|
||||
---Purpose: Returns True if <Left> is greater than <Right>.
|
||||
returns Boolean
|
||||
is redefined;
|
||||
|
||||
end;
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 1992-08-27
|
||||
// Created by: Mireille MERCIEN
|
||||
// Copyright (c) 1992-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.
|
||||
|
||||
#include <TCollection_CompareOfInteger.ixx>
|
||||
|
||||
// -----------
|
||||
// Create :
|
||||
// -----------
|
||||
TCollection_CompareOfInteger::TCollection_CompareOfInteger()
|
||||
{
|
||||
}
|
||||
|
||||
// -----------
|
||||
// IsLower :
|
||||
// -----------
|
||||
Standard_Boolean TCollection_CompareOfInteger::IsLower (
|
||||
const Standard_Integer &Left,const Standard_Integer &Right) const
|
||||
{
|
||||
return (Left < Right) ;
|
||||
}
|
||||
|
||||
// -----------
|
||||
// IsGreater :
|
||||
// -----------
|
||||
Standard_Boolean TCollection_CompareOfInteger::IsGreater (
|
||||
const Standard_Integer &Left,const Standard_Integer &Right) const
|
||||
{
|
||||
return (Left > Right) ;
|
||||
}
|
@@ -1,37 +0,0 @@
|
||||
-- Created on: 1992-08-27
|
||||
-- Created by: Mireille MERCIEN
|
||||
-- Copyright (c) 1992-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.
|
||||
|
||||
class CompareOfReal from TCollection
|
||||
inherits
|
||||
PrivCompareOfReal
|
||||
|
||||
is
|
||||
|
||||
Create;
|
||||
|
||||
IsLower (me; Left, Right: Real)
|
||||
---Level: Public
|
||||
---Purpose: Returns True if <Left> is lower than <Right>.
|
||||
returns Boolean
|
||||
is redefined;
|
||||
|
||||
IsGreater (me; Left, Right: Real)
|
||||
---Level: Public
|
||||
---Purpose: Returns True if <Left> is greater than <Right>.
|
||||
returns Boolean
|
||||
is redefined;
|
||||
|
||||
end;
|
@@ -1,47 +0,0 @@
|
||||
// Created on: 1992-08-27
|
||||
// Created by: Mireille MERCIEN
|
||||
// Copyright (c) 1992-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.
|
||||
|
||||
#include <TCollection_CompareOfReal.ixx>
|
||||
|
||||
// -----------
|
||||
// Create :
|
||||
// -----------
|
||||
TCollection_CompareOfReal::TCollection_CompareOfReal()
|
||||
{
|
||||
}
|
||||
|
||||
// -----------
|
||||
// IsLower :
|
||||
// -----------
|
||||
Standard_Boolean TCollection_CompareOfReal::IsLower (
|
||||
const Standard_Real &Left,const Standard_Real &Right) const
|
||||
{
|
||||
return (Left < Right) ;
|
||||
}
|
||||
|
||||
// -----------
|
||||
// IsGreater :
|
||||
// -----------
|
||||
Standard_Boolean TCollection_CompareOfReal::IsGreater (
|
||||
const Standard_Real &Left,const Standard_Real &Right) const
|
||||
{
|
||||
return (Left > Right) ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user