0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[occt.git] / src / AdvApp2Var / AdvApp2Var_EvaluatorFunc2Var.hxx
CommitLineData
b311480e 1// Created on: 1996-04-18
2// Created by: Joelle CHAUVET
3// Copyright (c) 1996-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 AdvApp2Var_EvaluatorFunc2Var_HeaderFile
18#define AdvApp2Var_EvaluatorFunc2Var_HeaderFile
19
7fd59977 20#include <Standard_Integer.hxx>
7fd59977 21#include <Standard_Real.hxx>
7fd59977 22#include <Standard_PrimitiveTypes.hxx>
7fd59977 23
41194117
K
24// History - the C function pointer converted to a virtual class
25// in order to get rid of usage of static functions and static data
26class AdvApp2Var_EvaluatorFunc2Var
27{
28public:
29
30 //! Empty constructor
31 AdvApp2Var_EvaluatorFunc2Var() {}
32
33 //! Destructor should be declared as virtual
34 virtual ~AdvApp2Var_EvaluatorFunc2Var () {}
35
36 //! Function evaluation method to be defined by descendant
37 virtual void Evaluate (Standard_Integer* theDimension,
ff8178ef 38 Standard_Real* theUStartEnd, //!< First and last parameters in U
39 Standard_Real* theVStartEnd, //!< First and last parameters in V
41194117
K
40 Standard_Integer* theFavorIso, //!< Choice of constante, 1 for U, 2 for V
41 Standard_Real* theConstParam, //!< Value of constant parameter
42 Standard_Integer* theNbParams, //!< Number of parameters N
43 Standard_Real* theParameters, //!< Values of parameters,
44 Standard_Integer* theUOrder, //!< Derivative Request in U
45 Standard_Integer* theVOrder, //!< Derivative Request in V
46 Standard_Real* theResult, //!< Result[Dimension,N]
47 Standard_Integer* theErrorCode) const = 0;
48
49 //! Shortcut for function-call style usage
50 void operator() (Standard_Integer* theDimension,
51 Standard_Real* theUStartEnd,
52 Standard_Real* theVStartEnd,
53 Standard_Integer* theFavorIso,
54 Standard_Real* theConstParam,
55 Standard_Integer* theNbParams,
56 Standard_Real* theParameters,
57 Standard_Integer* theUOrder,
58 Standard_Integer* theVOrder,
59 Standard_Real* theResult,
60 Standard_Integer* theErrorCode) const
61 {
62 Evaluate (theDimension, theUStartEnd, theVStartEnd, theFavorIso,
63 theConstParam, theNbParams,
64 theParameters, theUOrder, theVOrder, theResult, theErrorCode);
65 }
66
67private:
68
69 //! Copy constructor is declared private to forbid copying
70 AdvApp2Var_EvaluatorFunc2Var (const AdvApp2Var_EvaluatorFunc2Var& ) {}
7fd59977 71
41194117
K
72 //! Assignment operator is declared private to forbid copying
73 void operator= (const AdvApp2Var_EvaluatorFunc2Var& ) {}
74};
7fd59977 75
76#endif