strus  0.17
scalarFunctionInstanceInterface.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Patrick P. Frey
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
10 #ifndef _STRUS_SCALAR_FUNCTION_INSTANCE_INTERFACE_HPP_INCLUDED
11 #define _STRUS_SCALAR_FUNCTION_INSTANCE_INTERFACE_HPP_INCLUDED
12 #include <string>
13 
14 namespace strus
15 {
17 class ScalarFunctionContextInterface;
18 
21 {
22 public:
25 
30  virtual void setVariableValue( const std::string& name, double value)=0;
31 
35  virtual double call( const double* args, unsigned int nofargs) const=0;
36 
38  virtual std::string tostring() const=0;
39 };
40 
41 } //namespace
42 #endif
43 
44 
virtual void setVariableValue(const std::string &name, double value)=0
Initialize a variable value.
virtual std::string tostring() const =0
Return the representation (VM code or whatever it is) of the function with variables substituted as s...
virtual double call(const double *args, unsigned int nofargs) const =0
Execute the function.
Interface for parameterizing a scalar function.
Definition: scalarFunctionInstanceInterface.hpp:20
virtual ~ScalarFunctionInstanceInterface()
Destructor.
Definition: scalarFunctionInstanceInterface.hpp:24