xapian-core  1.4.27
positionlist.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2007,2010,2017 Olly Betts
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef XAPIAN_INCLUDED_POSITIONLIST_H
22 #define XAPIAN_INCLUDED_POSITIONLIST_H
23 
24 #include <xapian/intrusive_ptr.h>
26 #include <xapian/types.h>
27 
28 namespace Xapian {
29 
32 {
34  void operator=(const Internal &) = delete;
35 
37  Internal(const Internal &) = delete;
38 
39  protected:
41  Internal() { }
42 
43  public:
47  virtual ~Internal() { }
48 
50  virtual Xapian::termcount get_approx_size() const = 0;
51 
53  virtual Xapian::termpos get_position() const = 0;
54 
63  virtual bool next() = 0;
64 
73  virtual bool skip_to(Xapian::termpos termpos) = 0;
74 };
75 
76 }
77 
79 
80 #endif // XAPIAN_INCLUDED_POSITIONLIST_H
The Xapian namespace contains public interfaces for the Xapian library.
Definition: compactor.cc:80
typedefs for Xapian
void operator=(const Internal &)=delete
Don&#39;t allow assignment.
virtual ~Internal()
We have virtual methods and want to be able to delete derived classes using a pointer to the base cla...
Definition: positionlist.h:47
virtual bool next()=0
Advance to the next entry in the positionlist.
Xapian::PositionIterator::Internal PositionList
Definition: positionlist.h:78
Class for iterating over term positions.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Definition: types.h:72
virtual bool skip_to(Xapian::termpos termpos)=0
Skip forward to the specified position.
virtual Xapian::termpos get_position() const =0
Return the current position.
Base class for objects managed by intrusive_ptr.
Definition: intrusive_ptr.h:49
virtual Xapian::termcount get_approx_size() const =0
Return approximate size of this positionlist.
unsigned XAPIAN_TERMPOS_BASE_TYPE termpos
A term position within a document or query.
Definition: types.h:83
Abstract base class for iterating term positions in a document.
Definition: positionlist.h:31
Internal()
Only constructable as a base class for derived classes.
Definition: positionlist.h:41