strus  0.17
weightingFunctionInstanceInterface.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_WEIGHTING_FUNCTION_INSTANCE_INTERFACE_HPP_INCLUDED
11 #define _STRUS_WEIGHTING_FUNCTION_INSTANCE_INTERFACE_HPP_INCLUDED
13 #include <string>
14 
15 namespace strus
16 {
18 class WeightingFunctionContextInterface;
20 class NumericVariant;
22 class StorageClientInterface;
24 class MetaDataReaderInterface;
26 class PostingIteratorInterface;
27 
30 {
31 public:
34 
38  virtual void addStringParameter( const std::string& name, const std::string& value)=0;
39 
43  virtual void addNumericParameter( const std::string& name, const NumericVariant& value)=0;
44 
51  const StorageClientInterface* storage_,
52  MetaDataReaderInterface* metadata_,
53  const GlobalStatistics& stats) const=0;
54 
57  virtual std::vector<std::string> getVariables() const=0;
58 
61  virtual std::string tostring() const=0;
62 };
63 
64 }//namespace
65 #endif
66 
Interface of a strus IR storage.
Definition: storageClientInterface.hpp:52
virtual WeightingFunctionContextInterface * createFunctionContext(const StorageClientInterface *storage_, MetaDataReaderInterface *metadata_, const GlobalStatistics &stats) const =0
Create an execution context for this weighting function instance.
virtual std::vector< std::string > getVariables() const =0
Get the list of variables used by this function defined in the query with 'QueryInterface::setWeighti...
Interface for a parameterized weighting function instance.
Definition: weightingFunctionInstanceInterface.hpp:29
virtual void addNumericParameter(const std::string &name, const NumericVariant &value)=0
Add a named numeric value parameter.
Interface for a weighting function with its state and context used during calculation.
Definition: weightingFunctionContextInterface.hpp:24
Interface for accessing meta data from a strus storage.
Definition: metaDataReaderInterface.hpp:24
virtual void addStringParameter(const std::string &name, const std::string &value)=0
Add a named string value parameter.
virtual ~WeightingFunctionInstanceInterface()
Destructor.
Definition: weightingFunctionInstanceInterface.hpp:33
Global document statistics, if passed down with the query.
Definition: globalStatistics.hpp:16
virtual std::string tostring() const =0
Get a comma ',' separated list of the function parameters as assignments (e.g. name=value) ...