0027961: Visualization - remove unused and no more working OpenGl_AVIWriter
[occt.git] / src / BSplCLib / BSplCLib_EvaluatorFunction.hxx
1 // Created on: 1997-03-03
2 // Created by: Xavier BENVENISTE
3 // Copyright (c) 1997-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _BSplCLib_EvaluatorFunction_HeaderFile
18 #define _BSplCLib_EvaluatorFunction_HeaderFile
19
20 #include <Standard_TypeDef.hxx>
21
22 // This is a one dimensional function
23 // NOTE: StartEnd[2]
24 // Serves to multiply a given vectorial BSpline by a function
25
26 // History - C function pointer converted to a virtual class
27 // in order to get rid of usage of static functions and static data
28 class BSplCLib_EvaluatorFunction
29 {
30 public:
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
55 private:
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 };
63
64 #endif