~mixxxdevelopers/mixxx/features_search

« back to all changes in this revision

Viewing changes to mixxx/lib/clucene-2.3.3.4/src/core/CLucene/search/spans/SpanScorer.h

  • Committer: RJ Ryan
  • Date: 2011-05-27 23:54:08 UTC
  • Revision ID: rryan@mit.edu-20110527235408-kepzw0zdxdhngsqr
Add clucene-2.3.3.4 to lib/

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*------------------------------------------------------------------------------
 
2
 * Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team
 
3
 * 
 
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_SpanScorer_
 
8
#define _lucene_search_spans_SpanScorer_
 
9
 
 
10
#include "CLucene/search/Scorer.h"
 
11
CL_CLASS_DEF2(search,spans,Spans)
 
12
CL_CLASS_DEF(search,Explanation)
 
13
CL_CLASS_DEF(search,Weight)
 
14
 
 
15
CL_NS_DEF2(search, spans)
 
16
 
 
17
/**
 
18
 * Public for extension only.
 
19
 */
 
20
class CLUCENE_EXPORT SpanScorer : public CL_NS(search)::Scorer 
 
21
{
 
22
protected:
 
23
    Spans *                     spans;
 
24
    CL_NS(search)::Weight *     weight;
 
25
    uint8_t*                    norms;
 
26
    float_t                     value;
 
27
 
 
28
    bool                        firstTime;
 
29
    bool                        more;
 
30
 
 
31
    int32_t                     doc_;
 
32
    float_t                     freq;
 
33
 
 
34
 
 
35
public:
 
36
    SpanScorer( Spans * spans, Weight * weight, Similarity * similarity, uint8_t* norms );    
 
37
    virtual ~SpanScorer();
 
38
 
 
39
        bool next();
 
40
        bool skipTo( int32_t target );
 
41
        int32_t doc() const;
 
42
        float_t score();
 
43
        CL_NS(search)::Explanation* explain( int32_t docIn );
 
44
        TCHAR* toString();
 
45
 
 
46
protected:
 
47
    bool setFreqCurrentDoc();
 
48
};
 
49
 
 
50
CL_NS_END2
 
51
#endif // _lucene_search_spans_SpanScorer_