1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-08 18:40:55 +03:00

0025622: CAST analysis: Avoid invocation of virtual Methods of the declared Class in a Constructor or Destructor

The Delete() methods have been deleted from the following classes:
- Adaptor2d_Curve2d
- Adaptor3d_Curve
- Adaptor3d_Surface
- AppBlend_Approx
- AppCont_Function
- AppParCurves_MultiCurve
- AppParCurves_MultiPoint
- ApproxInt_SvSurfaces
- BRepPrim_OneAxis
- BRepSweep_NumLinearRegularSweep
- BRepSweep_Translation
- BRepSweep_Trsf
- DBC_BaseArray
- GeomFill_Profiler
- HatchGen_PointOnHatching
- math_BFGS
- math_FunctionSet
- math_FunctionSetRoot
- math_FunctionWithDerivative
- math_MultipleVarFunction
- math_MultipleVarFunctionWithHessian
- math_MultipleVarFunctionWithGradient
- math_Powell
- math_NewtonMinimum
- math_NewtonFunctionSetRoot
- math_BissecNewton (just add virtual destructor)
- math_FRPR
- math_BrentMinimum (just add virtual destructor)
- OSD_Chronometer
- ProjLib_Projector

Virtual methods Delete() or Destroy() of the transient inheritors is not changed (-> separate issue).
Classes Graphic3d_DataStructureManager and PrsMgr_Presentation without changes.
This commit is contained in:
azn 2014-12-18 10:27:01 +03:00 committed by bugmaster
parent e2b55410ff
commit 6da30ff153
63 changed files with 226 additions and 239 deletions
src
Adaptor2d
Adaptor3d
AppBlend
AppCont
AppParCurves
ApproxInt
BRepPrim
BRepSweep
DBC
GeomFill
HatchGen
Interface
OSD
ProjLib
math

@ -52,9 +52,6 @@ is
-- Global methods - Apply to the whole curve.
--
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~Adaptor2d_Curve2d(){Delete();}"
FirstParameter(me) returns Real
is virtual;
@ -229,6 +226,8 @@ is
raises
NoSuchObject from Standard
is virtual;
---C++: alias " Standard_EXPORT virtual ~Adaptor2d_Curve2d();"
end Curve2d;

@ -17,8 +17,15 @@
#include <Adaptor2d_Curve2d.ixx>
#include <Standard_NotImplemented.hxx>
void Adaptor2d_Curve2d::Delete()
{}
//=======================================================================
//function : ~Adaptor2d_Curve2d
//purpose : Destructor
//=======================================================================
Adaptor2d_Curve2d::~Adaptor2d_Curve2d()
{
}
//=======================================================================
//function : FirstParameter

@ -54,9 +54,6 @@ is
-- Global methods - Apply to the whole curve.
--
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~Adaptor3d_Curve(){Delete();}"
FirstParameter(me) returns Real
is virtual;
@ -245,6 +242,8 @@ is
raises
NoSuchObject from Standard
is virtual;
---C++: alias " Standard_EXPORT virtual ~Adaptor3d_Curve();"
end Curve;

@ -17,8 +17,14 @@
#include <Adaptor3d_Curve.ixx>
#include <Standard_NotImplemented.hxx>
void Adaptor3d_Curve::Delete()
{}
//=======================================================================
//function : ~Adaptor3d_Curve
//purpose : Destructor
//=======================================================================
Adaptor3d_Curve::~Adaptor3d_Curve()
{
}
//=======================================================================
//function : FirstParameter

@ -62,9 +62,6 @@ is
-- Global methods - Apply to the whole surface.
--
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~Adaptor3d_Surface(){Delete();}"
FirstUParameter(me) returns Real
is virtual;
@ -315,6 +312,8 @@ is
raises
NoSuchObject from Standard -- only for Offset Surface
is virtual;
---C++: alias " Standard_EXPORT virtual ~Adaptor3d_Surface();"
end Surface;

@ -17,8 +17,14 @@
#include <Adaptor3d_Surface.ixx>
#include <Standard_NotImplemented.hxx>
void Adaptor3d_Surface::Delete()
{}
//=======================================================================
//function : ~Adaptor3d_Surface
//purpose : Destructor
//=======================================================================
Adaptor3d_Surface::~Adaptor3d_Surface()
{
}
//=======================================================================
//function : FirstUParameter

@ -35,13 +35,6 @@ raises NotDone from StdFail,
is
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~AppBlend_Approx(){Delete() ; }"
IsDone(me)
returns Boolean from Standard
is deferred;
@ -204,5 +197,6 @@ is
raises NotDone from StdFail
is deferred;
---C++: alias " Standard_EXPORT virtual ~AppBlend_Approx();"
end Approx;

@ -16,5 +16,10 @@
#include <AppBlend_Approx.ixx>
void AppBlend_Approx::Delete()
{}
//=======================================================================
//function : AppBlend_Approx
//purpose : Destructor
//=======================================================================
AppBlend_Approx::~AppBlend_Approx()
{
}

@ -54,6 +54,7 @@ public:
return myNbPnt2d;
}
//! Destructor
Standard_EXPORT virtual ~AppCont_Function() {}
//! Returns the first parameter of the function.

@ -80,11 +80,9 @@ is
returns MultiCurve from AppParCurves
raises ConstructionError from Standard;
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~AppParCurves_MultiCurve(){Delete();}"
---C++: alias " Standard_EXPORT virtual ~AppParCurves_MultiCurve();"
SetNbPoles(me: in out; nbPoles: Integer)
---Purpose: The number of poles of the MultiCurve
-- will be set to <nbPoles>.

@ -40,8 +40,9 @@ AppParCurves_MultiCurve::AppParCurves_MultiCurve (const AppParCurves_Array1OfMul
}
void AppParCurves_MultiCurve::Delete()
{}
AppParCurves_MultiCurve::~AppParCurves_MultiCurve()
{
}
Standard_Integer AppParCurves_MultiCurve::Dimension (const Standard_Integer Index) const {
Standard_Integer Lo = tabPoint->Lower();

@ -74,10 +74,8 @@ is
-- NbPoints is the total number of Points.
returns MultiPoint from AppParCurves;
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~AppParCurves_MultiPoint(){Delete();}"
---C++: alias " Standard_EXPORT virtual ~AppParCurves_MultiPoint();"
SetPoint(me: in out; Index: Integer; Point: Pnt)
---Purpose: the 3d Point of range Index of this MultiPoint is

@ -99,8 +99,9 @@ AppParCurves_MultiPoint::AppParCurves_MultiPoint(const TColgp_Array1OfPnt& tab
}
}
void AppParCurves_MultiPoint::Delete()
{}
AppParCurves_MultiPoint::~AppParCurves_MultiPoint()
{
}
void AppParCurves_MultiPoint::Transform(const Standard_Integer CuIndex,
const Standard_Real x,

@ -24,9 +24,6 @@ uses
is
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~ApproxInt_SvSurfaces(){Delete() ; }"
Compute(me: in out;
u1,v1,u2,v2: in out Real from Standard;
Pt: out Pnt from gp;
@ -52,7 +49,9 @@ is
TangencyOnSurf2(me: in out;
u1,v1,u2,v2: in Real from Standard;
Tg: out Vec2d from gp)
returns Boolean from Standard is deferred;
returns Boolean from Standard is deferred;
---C++: alias " Standard_EXPORT virtual ~ApproxInt_SvSurfaces();"
end SvSurfaces;

@ -14,5 +14,10 @@
#include <ApproxInt_SvSurfaces.ixx>
void ApproxInt_SvSurfaces::Delete()
{}
//=======================================================================
//function : ~ApproxInt_SvSurfaces
//purpose : Destructor
//=======================================================================
ApproxInt_SvSurfaces::~ApproxInt_SvSurfaces()
{
}

@ -67,9 +67,6 @@ raises
OutOfRange
is
Delete(me:out) is virtual ;
---C++: alias ~
Initialize(B : Builder from BRepPrim;
A : Ax2 from gp;
VMin, VMax : Real from Standard);
@ -433,6 +430,8 @@ is
raises DomainError -- if VMinInfinite()
is static;
---C++ : alias " Standard_EXPORT virtual ~BRepPrim_OneAxis();"
fields
myBuilder : Builder from BRepPrim is protected;
myAxes : Ax2 from gp;

@ -129,8 +129,14 @@ BRepPrim_OneAxis::BRepPrim_OneAxis(const BRepPrim_Builder& B,
}
void BRepPrim_OneAxis::Delete()
{}
//=======================================================================
//function : ~BRepPrim_OneAxis
//purpose : Destructor
//=======================================================================
BRepPrim_OneAxis::~BRepPrim_OneAxis()
{
}
//=======================================================================
//function : SetMeridianOffset

@ -81,15 +81,11 @@ is
-- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Delete(me:out) is virtual ;
---C++: alias ~
Initialize(aBuilder : Builder from BRepSweep;
aGenShape : Shape from TopoDS;
aDirWire : NumShape from Sweep);
---Purpose: Creates a NumLinearRegularSweep. <aBuilder> gives
-- basic topological services.
-- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-- Deferred Methods supporting the creation of the geometric part.
@ -97,10 +93,10 @@ is
-- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
MakeEmptyVertex(me : in out; aGenV: Shape from TopoDS; aDirV: NumShape from Sweep)
returns Shape from TopoDS
returns Shape from TopoDS is deferred;
---Purpose: Builds the vertex addressed by [aGenV,aDirV], with its
-- geometric part, but without subcomponents.
is deferred;
---C++ : alias " Standard_EXPORT virtual ~BRepSweep_NumLinearRegularSweep();"
MakeEmptyDirectingEdge(me: in out; aGenV: Shape from TopoDS; aDirE: NumShape from Sweep)
returns Shape from TopoDS
@ -326,8 +322,7 @@ is
Closed(me) returns Boolean from Standard is static;
fields
-- Topology builder.

@ -62,8 +62,14 @@ BRepSweep_NumLinearRegularSweep::BRepSweep_NumLinearRegularSweep
myBuiltShapes.Init(Standard_False);
}
void BRepSweep_NumLinearRegularSweep::Delete()
{}
//=======================================================================
//function : ~BRepSweep_NumLinearRegularSweep
//purpose : Destructor
//=======================================================================
BRepSweep_NumLinearRegularSweep::~BRepSweep_NumLinearRegularSweep()
{
}
//=======================================================================
//function : Shape

@ -45,9 +45,6 @@ is
raises
ConstructionError from Standard; -- if <V> is null
Delete(me:out) is redefined;
---C++: alias "Standard_EXPORT virtual ~BRepSweep_Translation(){Delete() ; }"
-- """"""""""""""""""""""""""""""""""""""""""""""""""""""
-- Methods supporting the creation of the geometric part.
-- """"""""""""""""""""""""""""""""""""""""""""""""""""""

@ -94,10 +94,6 @@ BRepSweep_Translation::BRepSweep_Translation(const TopoDS_Shape& S,
Init();
}
void BRepSweep_Translation::Delete()
{}
//=======================================================================
//function : MakeEmptyVertex
//purpose :

@ -42,10 +42,6 @@ uses
Orientation from TopAbs
is
Delete(me:out) is redefined;
---C++: alias "Standard_EXPORT virtual ~BRepSweep_Trsf(){Delete() ; }"
Initialize(aBuilder : Builder from BRep;
aGenShape : Shape from TopoDS;
aDirWire : NumShape from Sweep;

@ -40,10 +40,6 @@ BRepSweep_Trsf::BRepSweep_Trsf(const BRep_Builder& aBuilder,
{
}
void BRepSweep_Trsf::Delete()
{}
void BRepSweep_Trsf::Init()
{
if(!myCopy){

@ -35,8 +35,7 @@ is
---Purpose: Creates an array which is the copy of the given
-- argument.
Delete ( me : out ) is redefined;
---C++: alias "Standard_EXPORT virtual ~DBC_BaseArray(){Delete();}"
---C++: alias " Standard_EXPORT virtual ~DBC_BaseArray();"
Length (me) returns Integer is static ;
---C++: inline

@ -163,8 +163,9 @@ DBC_BaseArray::DBC_BaseArray (const DBC_BaseArray& Other)
}
void DBC_BaseArray::Delete()
{}
DBC_BaseArray::~DBC_BaseArray()
{
}
// --------------------------------------------------------------------

@ -37,8 +37,7 @@ raises
is
Create returns Profiler from GeomFill;
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~GeomFill_Profiler(){Delete() ; }"
---C++: alias " Standard_EXPORT virtual ~GeomFill_Profiler();"
AddCurve( me : in out;
Curve : in Curve from Geom)

@ -125,8 +125,9 @@ GeomFill_Profiler::GeomFill_Profiler()
//=======================================================================
void GeomFill_Profiler::Delete()
{}
GeomFill_Profiler::~GeomFill_Profiler()
{
}
//=======================================================================

@ -170,7 +170,9 @@ is
---Purpose: Dump of the point on element.
is deferred ;
is deferred;
---C++: alias " Standard_EXPORT virtual ~HatchGen_IntersectionPoint();"
fields

@ -32,6 +32,16 @@ HatchGen_IntersectionPoint::HatchGen_IntersectionPoint () :
{
}
//=======================================================================
// Function : ~HatchGen_IntersectionPoint
// Purpose : Destructor
//=======================================================================
HatchGen_IntersectionPoint::~HatchGen_IntersectionPoint()
{
}
//=======================================================================
// Function : SetIndex
// Purpose : Sets the index of the supporting curve.

@ -58,11 +58,6 @@ is
---Category: PointOnHatching
returns PointOnHatching from HatchGen ;
Delete (me : out) is virtual;
---C++: alias "Standard_EXPORT virtual ~HatchGen_PointOnHatching(){Delete();}"
---Purpose: linux porting
AddPoint (me : in out ; Point : PointOnElement from HatchGen ;
Confusion : Real from Standard)

@ -68,9 +68,6 @@ HatchGen_PointOnHatching::HatchGen_PointOnHatching (const IntRes2d_IntersectionP
myPoints.Clear() ;
}
void HatchGen_PointOnHatching::Delete()
{}
//=======================================================================
// Function : AddPoint
// Purpose : Adds a point on element to the point.
@ -88,7 +85,6 @@ void HatchGen_PointOnHatching::AddPoint (const HatchGen_PointOnElement& Point,
if (IPnt > NbPnt) myPoints.Append (Point) ;
}
//=======================================================================
// Function : NbPoints
// Purpose : Returns the number of elements intersecting the hatching at

@ -192,8 +192,7 @@ is
-- asked for copy by the user of CopyTool, not by copying
-- another Entity)
Destroy (me: in out) is virtual;
---C++: alias "Standard_EXPORT virtual ~Interface_CopyTool() { Destroy(); }"
---C++: alias " Standard_EXPORT virtual ~Interface_CopyTool();"
fields

@ -325,4 +325,11 @@ Interface_CopyTool::Interface_CopyTool
return iter;
}
void Interface_CopyTool::Destroy(){}
//=======================================================================
//function : ~Interface_CopyTool
//purpose : Destructor
//=======================================================================
Interface_CopyTool::~Interface_CopyTool()
{
}

@ -42,8 +42,7 @@ is
--
---Level: Public
Destroy ( me : out ) is virtual;
---C++: alias ~
---C++ : alias " Standard_EXPORT virtual ~OSD_Chronometer();"
Reset (me : in out) is virtual;
---Purpose: Stops and Reinitializes the Chronometer.

@ -171,10 +171,10 @@ OSD_Chronometer::OSD_Chronometer(const Standard_Boolean ThisThreadOnly)
}
//=======================================================================
//function : Destroy
//purpose :
//function : ~OSD_Chronometer
//purpose : Destructor
//=======================================================================
void OSD_Chronometer::Destroy ()
OSD_Chronometer::~OSD_Chronometer()
{
}

@ -42,8 +42,7 @@ is
Create ;
---Purpose: Sets the type to OtherCurve
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~ProjLib_Projector(){Delete() ; }"
---C++: alias " Standard_EXPORT virtual ~ProjLib_Projector();"
IsDone(me) returns Boolean from Standard
is static;

@ -28,13 +28,18 @@
//=======================================================================
ProjLib_Projector::ProjLib_Projector()
{}
{
}
//=======================================================================
void ProjLib_Projector::Delete()
{}
//function : ~ProjLib_Projector
//purpose : Destructor
//=======================================================================
ProjLib_Projector::~ProjLib_Projector()
{
}
//=======================================================================

@ -43,9 +43,7 @@ is
-- function F.
returns BFGS;
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~math_BFGS(){Delete() ; }"
---C++: alias "Standard_EXPORT virtual ~math_BFGS();"
Perform(me: in out; F: in out MultipleVarFunctionWithGradient;
StartingPoint: Vector)

@ -281,8 +281,9 @@ void math_BFGS::Perform(math_MultipleVarFunctionWithGradient& F,
}
void math_BFGS::Delete()
{}
math_BFGS::~math_BFGS()
{
}
void math_BFGS::Dump(Standard_OStream& o) const {

@ -51,8 +51,9 @@ is
-- The maximum number of iterations allowed is given by NbIterations.
returns BissecNewton;
---C++: alias " Standard_EXPORT virtual ~math_BissecNewton();"
IsSolutionReached(me: in out; F: out FunctionWithDerivative)
---Purpose:
-- This method is called at the end of each iteration to check if the

@ -15,6 +15,9 @@
#include <math_BissecNewton.ixx>
#include <math_FunctionWithDerivative.hxx>
math_BissecNewton::~math_BissecNewton()
{
}
void math_BissecNewton::Perform(math_FunctionWithDerivative& F,
const Standard_Real Bound1,

@ -64,8 +64,9 @@ is
-- The maximum number of iterations allowed is given by NbIterations.
returns BrentMinimum;
---C++: alias " Standard_EXPORT virtual ~math_BrentMinimum();"
Perform(me: in out; F: in out Function;
Ax, Bx, Cx: Real)
---Purpose:
@ -85,11 +86,11 @@ is
-- solution is found.
-- It can be redefined in a sub-class to implement a specific test to
-- stop the iterations.
returns Boolean
is virtual;
IsDone(me)
---Purpose: Returns true if the computations are successful, otherwise returns false.
---C++: inline

@ -23,6 +23,10 @@
#define SIGN(a,b) ((b) > 0.0 ? fabs(a) : -fabs(a))
#define SHFT(a,b,c,d) (a)=(b);(b)=(c);(c)=(d)
math_BrentMinimum::~math_BrentMinimum()
{
}
void math_BrentMinimum::Perform(math_Function& F,
const Standard_Real ax,
const Standard_Real bx,

@ -52,10 +52,8 @@ is
-- initialization to compute the minimum of the function.
returns FRPR;
---C++: alias " Standard_EXPORT virtual ~math_FRPR();"
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~math_FRPR(){Delete();}"
Perform(me: in out; F: in out MultipleVarFunctionWithGradient;
StartingPoint: Vector)
---Purpose: Use this method after a call to the initialization constructor

@ -216,8 +216,9 @@ void math_FRPR::Perform(math_MultipleVarFunctionWithGradient& F,
}
void math_FRPR::Delete()
{}
math_FRPR::~math_FRPR()
{
}
void math_FRPR::Dump(Standard_OStream& o) const {

@ -22,10 +22,6 @@ deferred class FunctionSet from math
uses Vector from math
is
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~math_FunctionSet(){Delete();}"
NbVariables(me)
---Purpose: Returns the number of variables of the function.
@ -46,8 +42,7 @@ is
-- returns True if the computation was done successfully,
-- False otherwise.
returns Boolean
is deferred;
returns Boolean is deferred;
GetStateNumber(me: in out)
@ -66,8 +61,9 @@ is
-- to save the current state of the function and to return
-- an Integer that allows retrieval of the state.
returns Integer
is virtual;
returns Integer is virtual;
---C++: alias " Standard_EXPORT virtual ~math_FunctionSet();"
end FunctionSet;

@ -15,7 +15,19 @@
#include <Standard_Integer.hxx>
#include <math_FunctionSet.ixx>
Standard_Integer math_FunctionSet::GetStateNumber() { return 0; }
//=======================================================================
//function : ~math_FunctionSet
//purpose : Destructor
//=======================================================================
math_FunctionSet::~math_FunctionSet()
{
}
void math_FunctionSet::Delete()
{}
//=======================================================================
//function : GetStateNumber
//purpose :
//=======================================================================
Standard_Integer math_FunctionSet::GetStateNumber()
{
return 0;
}

@ -85,11 +85,8 @@ is
returns FunctionSetRoot from math;
---C++: alias " Standard_EXPORT virtual ~math_FunctionSetRoot();"
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~math_FunctionSetRoot(){Delete();}"
SetTolerance(me: in out; Tolerance: Vector)
---Purpose: Initializes the tolerance values.
@ -107,7 +104,7 @@ is
-- not performed by the constructors.
is static;
IsSolutionReached(me: in out; F: in out FunctionSetWithDerivatives)
---Purpose: This routine is called at the end of each iteration

@ -689,8 +689,9 @@ DF(1, F.NbEquations(),
Perform(F, StartingPoint, InfBound, SupBound);
}
void math_FunctionSetRoot::Delete()
{}
math_FunctionSetRoot::~math_FunctionSetRoot()
{
}
void math_FunctionSetRoot::SetTolerance(const math_Vector& Tolerance)
{

@ -23,17 +23,12 @@ deferred class FunctionWithDerivative from math
inherits Function
is
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~math_FunctionWithDerivative(){Delete();}"
Value(me: in out; X: Real; F: out Real)
---Purpose: Computes the value <F>of the function for the variable <X>.
-- Returns True if the calculation were successfully done,
-- False otherwise.
returns Boolean
is deferred;
returns Boolean is deferred;
Derivative(me: in out; X: Real; D: out Real)
---Purpose: Computes the derivative <D> of the function
@ -41,8 +36,7 @@ is
-- Returns True if the calculation were successfully done,
-- False otherwise.
returns Boolean
is deferred;
returns Boolean is deferred;
Values(me: in out; X: Real; F, D: out Real)
---Purpose: Computes the value <F> and the derivative <D> of the
@ -50,7 +44,8 @@ is
-- Returns True if the calculation were successfully done,
-- False otherwise.
returns Boolean
is deferred;
returns Boolean is deferred;
---C++: alias " Standard_EXPORT virtual ~math_FunctionWithDerivative();"
end FunctionWithDerivative;

@ -14,5 +14,10 @@
#include <math_FunctionWithDerivative.ixx>
void math_FunctionWithDerivative::Delete()
{}
//=======================================================================
//function : ~math_FunctionWithDerivative
//purpose : Destructor
//=======================================================================
math_FunctionWithDerivative::~math_FunctionWithDerivative()
{
}

@ -20,9 +20,6 @@ deferred class MultipleVarFunction from math
uses Vector from math
is
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~math_MultipleVarFunction(){Delete();}"
NbVariables(me)
---Purpose:
-- Returns the number of variables of the function
@ -60,4 +57,6 @@ is
returns Integer
is virtual;
---C++: alias " Standard_EXPORT virtual ~math_MultipleVarFunction();"
end MultipleVarFunction;

@ -15,7 +15,19 @@
#include <Standard_Integer.hxx>
#include <math_MultipleVarFunction.ixx>
Standard_Integer math_MultipleVarFunction::GetStateNumber() { return 0; }
//=======================================================================
//function : ~math_MultipleVarFunction
//purpose : Destructor
//=======================================================================
math_MultipleVarFunction::~math_MultipleVarFunction()
{
}
void math_MultipleVarFunction::Delete()
{}
//=======================================================================
//function : GetStateNumber
//purpose :
//=======================================================================
Standard_Integer math_MultipleVarFunction::GetStateNumber()
{
return 0;
}

@ -23,15 +23,10 @@ inherits MultipleVarFunction
uses Vector from math
is
Delete(me:out) is redefined virtual;
---C++: alias "Standard_EXPORT virtual ~math_MultipleVarFunctionWithGradient(){Delete();}"
NbVariables(me)
---Purpose: Returns the number of variables of the function.
returns Integer
is deferred;
returns Integer is deferred;
Value(me: in out; X: Vector; F: out Real)
@ -39,8 +34,7 @@ is
-- Returns True if the computation was done successfully,
-- False otherwise.
returns Boolean
is deferred;
returns Boolean is deferred;
Gradient(me: in out; X: Vector; G: out Vector)
@ -48,8 +42,7 @@ is
-- Returns True if the computation was done successfully,
-- False otherwise.
returns Boolean
is deferred;
returns Boolean is deferred;
Values(me: in out; X: Vector; F: out Real; G: out Vector)
@ -58,7 +51,6 @@ is
-- Returns True if the computation was done successfully,
-- False otherwise.
returns Boolean
is deferred;
returns Boolean is deferred;
end MultipleVarFunctionWithGradient;

@ -1,18 +0,0 @@
// Copyright (c) 1997-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 <math_MultipleVarFunctionWithGradient.ixx>
void math_MultipleVarFunctionWithGradient::Delete()
{}

@ -23,15 +23,10 @@ uses Matrix from math,
Vector from math
is
Delete(me:out) is redefined virtual;
---C++: alias "Standard_EXPORT virtual ~math_MultipleVarFunctionWithHessian(){Delete();}"
NbVariables(me)
---Purpose: returns the number of variables of the function.
returns Integer
is deferred;
returns Integer is deferred;
Value(me: in out; X: Vector; F: out Real)
@ -40,8 +35,7 @@ is
-- Returns True if the computation was done successfully,
-- False otherwise.
returns Boolean
is deferred;
returns Boolean is deferred;
Gradient(me: in out; X: Vector; G: out Vector)
@ -50,8 +44,7 @@ is
-- Returns True if the computation was done successfully,
-- False otherwise.
returns Boolean
is deferred;
returns Boolean is deferred;
Values(me: in out; X: Vector; F: out Real; G: out Vector)
@ -60,8 +53,7 @@ is
-- Returns True if the computation was done successfully,
-- False otherwise.
returns Boolean
is deferred;
returns Boolean is deferred;
Values(me: in out; X: Vector; F: out Real; G: out Vector; H: out Matrix)
---Purpose: computes the value <F>, the gradient <G> and the
@ -69,8 +61,6 @@ is
-- Returns True if the computation was done
-- successfully, False otherwise.
returns Boolean
is deferred;
returns Boolean is deferred;
end MultipleVarFunctionWithHessian;

@ -1,20 +0,0 @@
// Created on: 1996-05-03
// Created by: Philippe MANGIN
// Copyright (c) 1996-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 <math_MultipleVarFunctionWithHessian.ixx>
void math_MultipleVarFunctionWithHessian::Delete()
{}

@ -88,8 +88,7 @@ is
returns NewtonFunctionSetRoot;
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~math_NewtonFunctionSetRoot(){Delete();}"
---C++: alias " Standard_EXPORT virtual ~math_NewtonFunctionSetRoot();"
SetTolerance(me: in out; XTol: Vector)
---Purpose: Initializes the tolerance values for the unknowns.

@ -130,8 +130,9 @@ math_NewtonFunctionSetRoot::math_NewtonFunctionSetRoot
Perform(F, StartingPoint, InfBound, SupBound);
}
void math_NewtonFunctionSetRoot::Delete()
{}
math_NewtonFunctionSetRoot::~math_NewtonFunctionSetRoot()
{
}
void math_NewtonFunctionSetRoot::SetTolerance
(const math_Vector& XTol)

@ -60,8 +60,7 @@ is
-- Warning: This constructor do not computation
returns NewtonMinimum;
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~math_NewtonMinimum(){Delete();}"
---C++: alias " Standard_EXPORT virtual ~math_NewtonMinimum();"
Perform(me: in out; F: in out MultipleVarFunctionWithHessian;
StartingPoint: Vector)

@ -69,8 +69,10 @@ math_NewtonMinimum::math_NewtonMinimum(math_MultipleVarFunctionWithHessian& F,
TheStatus = math_NotBracketed;
}
//============================================================================
void math_NewtonMinimum::Delete()
{}
math_NewtonMinimum::~math_NewtonMinimum()
{
}
//============================================================================
void math_NewtonMinimum::Perform(math_MultipleVarFunctionWithHessian& F,
const math_Vector& StartingPoint)

@ -48,10 +48,8 @@ is
-- of this class.
returns Powell;
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~math_Powell(){Delete();}"
---C++: alias " Standard_EXPORT virtual ~math_Powell();"
Perform(me: in out;F: in out MultipleVarFunction;
StartingPoint: Vector;

@ -104,7 +104,9 @@ static Standard_Boolean MinimizeDirection(math_Vector& P,
return Standard_False;
}
math_Powell::~math_Powell()
{
}
void math_Powell::Perform(math_MultipleVarFunction& F,
const math_Vector& StartingPoint,
@ -231,10 +233,7 @@ math_Powell::math_Powell(math_MultipleVarFunction& F,
XTol = Tolerance;
EPSZ = ZEPS;
Itermax = NbIterations;
}
void math_Powell::Delete()
{}
}
void math_Powell::Dump(Standard_OStream& o) const {