strusModule  0.17
storageModule.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_MODULE_STORAGE_HPP_INCLUDED
11 #define _STRUS_MODULE_STORAGE_HPP_INCLUDED
13 #include <string>
14 #include <cstring>
15 
17 namespace strus
18 {
19 
21 class DatabaseInterface;
23 class StatisticsProcessorInterface;
25 class VectorStorageInterface;
27 class WeightingFunctionInterface;
29 class SummarizerFunctionInterface;
31 class PostingJoinOperatorInterface;
33 class ScalarFunctionParserInterface;
35 class ErrorBufferInterface;
36 
37 
40 {
41  typedef DatabaseInterface* (*Create)( const std::string& workdir, ErrorBufferInterface* errorhnd);
42  const char* name;
44 };
45 
48 {
49  typedef StatisticsProcessorInterface* (*Create)( ErrorBufferInterface* errorhnd);
50  const char* name;
52 };
53 
56 {
57  typedef VectorStorageInterface* (*Create)( const std::string& workdir, ErrorBufferInterface* errorhnd);
58  const char* name;
60 };
61 
64 {
65  typedef PostingJoinOperatorInterface* (*Create)( ErrorBufferInterface* errorhnd);
66  const char* name;
68 };
69 
72 {
73  typedef WeightingFunctionInterface* (*Create)( ErrorBufferInterface* errorhnd);
74  const char* name;
76 };
77 
80 {
81  typedef SummarizerFunctionInterface* (*Create)( ErrorBufferInterface* errorhnd);
82  const char* name;
84 };
85 
88 {
89  typedef ScalarFunctionParserInterface* (*Create)( ErrorBufferInterface* errorhnd);
90  const char* name;
92 };
93 
94 
97  :public ModuleEntryPoint
98 {
104  const PostingIteratorJoinConstructor* postingIteratorJoinConstructor_,
105  const WeightingFunctionConstructor* weightingFunctionConstructor_,
106  const SummarizerFunctionConstructor* summarizerFunctionConstructor_,
107  const char* version_3rdparty=0, const char* license_3rdparty=0);
108 
111  explicit StorageModule(
112  const DatabaseConstructor* databaseConstructor_,
113  const char* version_3rdparty=0, const char* license_3rdparty=0);
114 
117  explicit StorageModule(
118  const VectorStorageConstructor* vectorStorageConstructor_,
119  const char* version_3rdparty=0, const char* license_3rdparty=0);
120 
128 
129 private:
130  void init(
131  const DatabaseConstructor* databaseConstructor_,
132  const StatisticsProcessorConstructor* statisticsProcessorConstructor_,
133  const VectorStorageConstructor* vectorStorageConstructor_,
134  const PostingIteratorJoinConstructor* postingIteratorJoinConstructor_,
135  const WeightingFunctionConstructor* weightingFunctionConstructor_,
136  const SummarizerFunctionConstructor* summarizerFunctionConstructor_,
137  const ScalarFunctionParserConstructor* scalarFunctionParserConstructor_);
138 };
139 }//namespace
140 #endif
141 
StatisticsProcessorConstructor statisticsProcessorConstructor
alternative packing/unpacking of statistics messages
Definition: storageModule.hpp:122
const char * name
name of the parser implementation
Definition: storageModule.hpp:90
VectorStorageInterface *(* Create)(const std::string &workdir, ErrorBufferInterface *errorhnd)
Definition: storageModule.hpp:57
DatabaseInterface *(* Create)(const std::string &workdir, ErrorBufferInterface *errorhnd)
Definition: storageModule.hpp:41
Entry point of a module with signature and version info to verify correctness of the dynamic linking...
Definition: moduleEntryPoint.hpp:19
DatabaseConstructor databaseConstructor
alternative key value store database
Definition: storageModule.hpp:121
StorageModule(const PostingIteratorJoinConstructor *postingIteratorJoinConstructor_, const WeightingFunctionConstructor *weightingFunctionConstructor_, const SummarizerFunctionConstructor *summarizerFunctionConstructor_, const char *version_3rdparty=0, const char *license_3rdparty=0)
Storage module constructor.
const ScalarFunctionParserConstructor * scalarFunctionParserConstructor
scalar function parsers
Definition: storageModule.hpp:127
const PostingIteratorJoinConstructor * postingIteratorJoinConstructor
join operator function for postings
Definition: storageModule.hpp:124
Create create
constructor of the object
Definition: storageModule.hpp:43
const WeightingFunctionConstructor * weightingFunctionConstructor
alternative weighting functions for ranking
Definition: storageModule.hpp:125
const char * name
name of the weighting function
Definition: storageModule.hpp:74
Create create
constructor of the function
Definition: storageModule.hpp:83
Create create
constructor of the object
Definition: storageModule.hpp:51
const char * name
name of the implementation
Definition: storageModule.hpp:58
const char * version_3rdparty
3rd party version info
Definition: moduleEntryPoint.hpp:46
Create create
constructor of the function
Definition: storageModule.hpp:67
Create create
constructor of the object
Definition: storageModule.hpp:91
const char * name
name of the join operator
Definition: storageModule.hpp:66
const char * license_3rdparty
3rd party license text
Definition: moduleEntryPoint.hpp:47
StatisticsProcessorInterface *(* Create)(ErrorBufferInterface *errorhnd)
Definition: storageModule.hpp:49
Structure to declare the key value store database to use by the storage as module object...
Definition: storageModule.hpp:39
Structure to declare an alternative vector storage to map vectors to sets of features.
Definition: storageModule.hpp:55
const char * name
name of the implementation
Definition: storageModule.hpp:50
const char * name
name of the database implementation
Definition: storageModule.hpp:42
Structure to declare an operator to join sets of postings represented as iterator as module object...
Definition: storageModule.hpp:63
const char * name
name of the summarizer function
Definition: storageModule.hpp:82
Create create
constructor of the object
Definition: storageModule.hpp:59
Structure to declare a parser, resp. compiler for scalar function definition source.
Definition: storageModule.hpp:87
Structure to declare a query evaluation weighting function as module object.
Definition: storageModule.hpp:71
PostingJoinOperatorInterface *(* Create)(ErrorBufferInterface *errorhnd)
Definition: storageModule.hpp:65
Header with object types needed for declaration of a strus module.
WeightingFunctionInterface *(* Create)(ErrorBufferInterface *errorhnd)
Definition: storageModule.hpp:73
Create create
constructor of the function
Definition: storageModule.hpp:75
ScalarFunctionParserInterface *(* Create)(ErrorBufferInterface *errorhnd)
Definition: storageModule.hpp:89
VectorStorageConstructor vectorStorageConstructor
alternative vectorspace model for mapping vectors to features
Definition: storageModule.hpp:123
SummarizerFunctionInterface *(* Create)(ErrorBufferInterface *errorhnd)
Definition: storageModule.hpp:81
Structure to declare a query evaluation summarizer function as module object.
Definition: storageModule.hpp:79
Structure to declare an alternative packing/unpacking of statistics messages.
Definition: storageModule.hpp:47
Structure that contains all storage module objects.
Definition: storageModule.hpp:96
const SummarizerFunctionConstructor * summarizerFunctionConstructor
summarizer functions
Definition: storageModule.hpp:126