Lucene++ - a full-featured, c++ search engine
API Documentation

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
DoubleFieldSource.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2011 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6
7 #ifndef DOUBLEFIELDSOURCE_H
8 #define DOUBLEFIELDSOURCE_H
9
10 #include "FieldCacheSource.h"
11 #include "DocValues.h"
12
13 namespace Lucene
14 {
25 class DoubleFieldSource : public FieldCacheSource
26 {
27 public:
29 DoubleFieldSource(const String& field, DoubleParserPtr parser = DoubleParserPtr());
30 virtual ~DoubleFieldSource();
31
32 LUCENE_CLASS(DoubleFieldSource);
33
34 protected:
35 DoubleParserPtr parser;
36
37 public:
38 virtual String description();
39 virtual DocValuesPtr getCachedFieldValues(FieldCachePtr cache, const String& field, IndexReaderPtr reader);
40 virtual bool cachedFieldSourceEquals(FieldCacheSourcePtr other);
41 virtual int32_t cachedFieldSourceHashCode();
42 };
43
44 class DoubleDocValues : public DocValues
45 {
46 public:
47 DoubleDocValues(DoubleFieldSourcePtr source, Collection<double> arr);
48 virtual ~DoubleDocValues();
49
50 LUCENE_CLASS(DoubleDocValues);
51
52 protected:
53 DoubleFieldSourceWeakPtr _source;
54 Collection<double> arr;
55
56 public:
57 virtual double doubleVal(int32_t doc);
58 virtual String toString(int32_t doc);
59 virtual CollectionValue getInnerArray();
60 };
61 }
62
63 #endif

clucene.sourceforge.net