0032742: Coding - get rid of unused headers [Adaptor2d to Approx]
[occt.git] / src / AdvApprox / AdvApprox_EvaluatorFunction.hxx
CommitLineData
b311480e 1// Created on: 1995-05-29
2// Created by: Xavier BENVENISTE
3// Copyright (c) 1995-1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 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
973c2be1 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.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
ebc93ae7 17#ifndef _AdvApprox_EvaluatorFunction_HeaderFile
18#define _AdvApprox_EvaluatorFunction_HeaderFile
19
7fd59977 20#include <Standard_PrimitiveTypes.hxx>
7fd59977 21
22// abv 01.04.2009: the C function pointer converted to a virtual class
23// in order to get rid of usage of static functions and static data
24
25//! Interface for a class implementing a function to be approximated
26//! by AdvApprox_ApproxAFunction
27class AdvApprox_EvaluatorFunction
28{
29 public:
30
31 //! Empty constructor
32 AdvApprox_EvaluatorFunction () {}
33
34 //! Destructor should be declared as virtual
35 virtual ~AdvApprox_EvaluatorFunction () {}
36
37 //! Function evaluation method to be defined by descendant
38 virtual void Evaluate (Standard_Integer *Dimension,
39 Standard_Real StartEnd[2],
40 Standard_Real *Parameter,
41 Standard_Integer *DerivativeRequest,
42 Standard_Real *Result, // [Dimension]
43 Standard_Integer *ErrorCode) = 0;
44
45 //! Shortcut for function-call style usage
46 void operator () (Standard_Integer *Dimension,
47 Standard_Real StartEnd[2],
48 Standard_Real *Parameter,
49 Standard_Integer *DerivativeRequest,
50 Standard_Real *Result, // [Dimension]
51 Standard_Integer *ErrorCode)
52 { Evaluate (Dimension, StartEnd, Parameter, DerivativeRequest, Result, ErrorCode); }
53
54 private:
55
56 //! Copy constructor is declared private to forbid copying
57 AdvApprox_EvaluatorFunction (const AdvApprox_EvaluatorFunction&) {}
58
59 //! Assignment operator is declared private to forbid copying
60 void operator = (const AdvApprox_EvaluatorFunction&) {}
61};
62
63#endif