0024737: Coding - remove <br> tag from header files
[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 // History - C function pointer converted to a virtual class
23 // in order to get rid of usage of static functions and static data
24 class BSplCLib_EvaluatorFunction
25 {
26 public:
27
28   //! Empty constructor
29   BSplCLib_EvaluatorFunction () {}
30
31   //! Destructor should be declared as virtual
32   virtual ~BSplCLib_EvaluatorFunction () {}
33
34   //! Function evaluation method to be defined by descendant
35   virtual void Evaluate (const Standard_Integer theDerivativeRequest,
36                          const Standard_Real*   theStartEnd,
37                          const Standard_Real    theParameter,
38                          Standard_Real&         theResult,
39                          Standard_Integer&      theErrorCode) const = 0;
40
41   //! Shortcut for function-call style usage
42   void operator () (const Standard_Integer theDerivativeRequest,
43                     const Standard_Real*   theStartEnd,
44                     const Standard_Real    theParameter,
45                     Standard_Real&         theResult,
46                     Standard_Integer&      theErrorCode) const
47   {
48     Evaluate (theDerivativeRequest, theStartEnd, theParameter, theResult, theErrorCode);
49   }
50
51 private:
52
53   //! Copy constructor is declared private to forbid copying
54   BSplCLib_EvaluatorFunction (const BSplCLib_EvaluatorFunction&) {}
55
56   //! Assignment operator is declared private to forbid copying
57   void operator = (const BSplCLib_EvaluatorFunction&) {}
58 };
59
60 #endif