0027961: Visualization - remove unused and no more working OpenGl_AVIWriter
[occt.git] / src / BSplCLib / BSplCLib_EvaluatorFunction.hxx
CommitLineData
b311480e 1// Created on: 1997-03-03
2// Created by: Xavier BENVENISTE
3// Copyright (c) 1997-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
7fd59977 17#ifndef _BSplCLib_EvaluatorFunction_HeaderFile
18#define _BSplCLib_EvaluatorFunction_HeaderFile
19
ebc93ae7 20#include <Standard_TypeDef.hxx>
7fd59977 21
ff8178ef 22// This is a one dimensional function
23// NOTE: StartEnd[2]
24// Serves to multiply a given vectorial BSpline by a function
25
41194117
K
26// History - C function pointer converted to a virtual class
27// in order to get rid of usage of static functions and static data
28class BSplCLib_EvaluatorFunction
29{
30public:
31
32 //! Empty constructor
33 BSplCLib_EvaluatorFunction () {}
34
35 //! Destructor should be declared as virtual
36 virtual ~BSplCLib_EvaluatorFunction () {}
37
38 //! Function evaluation method to be defined by descendant
39 virtual void Evaluate (const Standard_Integer theDerivativeRequest,
40 const Standard_Real* theStartEnd,
41 const Standard_Real theParameter,
42 Standard_Real& theResult,
43 Standard_Integer& theErrorCode) const = 0;
44
45 //! Shortcut for function-call style usage
46 void operator () (const Standard_Integer theDerivativeRequest,
47 const Standard_Real* theStartEnd,
48 const Standard_Real theParameter,
49 Standard_Real& theResult,
50 Standard_Integer& theErrorCode) const
51 {
52 Evaluate (theDerivativeRequest, theStartEnd, theParameter, theResult, theErrorCode);
53 }
54
55private:
56
57 //! Copy constructor is declared private to forbid copying
58 BSplCLib_EvaluatorFunction (const BSplCLib_EvaluatorFunction&) {}
59
60 //! Assignment operator is declared private to forbid copying
61 void operator = (const BSplCLib_EvaluatorFunction&) {}
62};
7fd59977 63
64#endif