strus  0.17
postingJoinOperatorInterface.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_POSTING_JOIN_OPERATOR_INTERFACE_HPP_INCLUDED
11 #define _STRUS_POSTING_JOIN_OPERATOR_INTERFACE_HPP_INCLUDED
13 #include "strus/reference.hpp"
14 #include <vector>
15 #include <string>
16 
17 namespace strus
18 {
20 class PostingIteratorInterface;
21 
24 {
25 public:
28 
35  const std::vector<Reference<PostingIteratorInterface> >& argitrs,
36  int range,
37  unsigned int cardinality) const=0;
38 
40  struct Description
41  {
44  :m_name(),m_text(){}
46  Description( const std::string& name_, const std::string& text_)
47  :m_name(name_),m_text(text_){}
50  :m_name(o.m_name),m_text(o.m_text){}
51 
53  const std::string& name() const {return m_name;}
55  const std::string& text() const {return m_text;}
56 
57  private:
58  std::string m_name;
59  std::string m_text;
60  };
61 
64  virtual Description getDescription() const=0;
65 };
66 
67 }//namespace
68 #endif
69 
70 
virtual PostingIteratorInterface * createResultIterator(const std::vector< Reference< PostingIteratorInterface > > &argitrs, int range, unsigned int cardinality) const =0
Create an iterator on the join operator result (set of postings)
virtual ~PostingJoinOperatorInterface()
Destructor.
Definition: postingJoinOperatorInterface.hpp:27
Description(const Description &o)
Copy constructor.
Definition: postingJoinOperatorInterface.hpp:49
Interface for an iterator on postings (pairs of (d,p) where d is the document number and p the positi...
Structure that represents a set of feature occurrencies (postings) as iterator.
Definition: postingIteratorInterface.hpp:20
Description()
Default constructor.
Definition: postingJoinOperatorInterface.hpp:43
const std::string & text() const
Get description text.
Definition: postingJoinOperatorInterface.hpp:55
const std::string & name() const
Get description text.
Definition: postingJoinOperatorInterface.hpp:53
Description(const std::string &name_, const std::string &text_)
Constructor.
Definition: postingJoinOperatorInterface.hpp:46
Structure that describes the join operator.
Definition: postingJoinOperatorInterface.hpp:40
Interface for creating iterators on joined sets of postings.
Definition: postingJoinOperatorInterface.hpp:23
virtual Description getDescription() const =0
Get a description of the function for user help and introspection.