1
/*------------------------------------------------------------------------------
2
* Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team
4
* Distributable under the terms of either the Apache License (Version 2.0) or
5
* the GNU Lesser General Public License, as specified in the COPYING file.
6
------------------------------------------------------------------------------*/
7
#ifndef _lucene_search_spans_EmptySpans_
8
#define _lucene_search_spans_EmptySpans_
13
CL_NS_DEF2( search, spans )
15
/** CLucene specific: Empty span enumeration, used for optimized cases
16
* when there are no clauses in SpanNearQuery or SpanOrQuery
18
class EmptySpans : public Spans
22
virtual ~ EmptySpans() {}
24
bool next() { return false; }
25
bool skipTo( int32_t target ) { return false; }
27
int32_t doc() const { assert( false ); return -1; }
28
int32_t start() const { assert( false ); return 0; }
29
int32_t end() const { assert( false ); return 1; }
31
TCHAR* toString() const { return STRDUP_TtoT( _T( "spans()" )); }
35
#endif // _lucene_search_spans_EmptySpans_