strus  0.17
scalarFunctionInterface.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_INTERFACE_HPP_INCLUDED
11 #define _STRUS_SCALAR_FUNCTION_INTERFACE_HPP_INCLUDED
12 #include <string>
13 #include <vector>
14 
15 namespace strus
16 {
18 class ScalarFunctionInstanceInterface;
19 
25 {
26 public:
29 
32  virtual std::vector<std::string> getVariables() const=0;
33 
36  virtual unsigned int getNofArguments() const=0;
37 
42  virtual void setDefaultVariableValue( const std::string& name, double value)=0;
43 
47 
49  virtual std::string tostring() const=0;
50 };
51 
52 }// namespace
53 #endif
54 
virtual unsigned int getNofArguments() const =0
Get the number of arguments of this function.
virtual ScalarFunctionInstanceInterface * createInstance() const =0
Creates an instance of the function.
virtual std::vector< std::string > getVariables() const =0
Get the list of variables the function is parameterized with.
virtual ~ScalarFunctionInterface()
Destructor.
Definition: scalarFunctionInterface.hpp:28
virtual std::string tostring() const =0
Return the representation (VM code or whatever it is) of the function as string.
virtual void setDefaultVariableValue(const std::string &name, double value)=0
Set a variable value default.
Interface for parameterizing a scalar function.
Definition: scalarFunctionInstanceInterface.hpp:20
Interface for a scalar function type.
Definition: scalarFunctionInterface.hpp:24