CLucene - a full-featured, c++ search engine
API Documentation
00001 /*------------------------------------------------------------------------------ 00002 * Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team 00003 * 00004 * Distributable under the terms of either the Apache License (Version 2.0) or 00005 * the GNU Lesser General Public License, as specified in the COPYING file. 00006 ------------------------------------------------------------------------------*/ 00007 #ifndef _lucene_search_FieldDoc_ 00008 #define _lucene_search_FieldDoc_ 00009 00010 #if defined(_LUCENE_PRAGMA_ONCE) 00011 # pragma once 00012 #endif 00013 00014 #include "ScoreDoc.h" 00015 00016 CL_NS_DEF(search) 00017 00018 00034 class FieldDoc: public ScoreDoc { 00035 public: 00036 00044 CL_NS(util)::Comparable** fields; 00045 00047 FieldDoc (int32_t doc, float_t score): 00048 ScoreDoc(doc,score) { 00049 fields=NULL; 00050 } 00051 00053 FieldDoc (int32_t doc, float_t score, CL_NS(util)::Comparable** fields): 00054 ScoreDoc(doc,score) 00055 { 00056 this->fields = fields; 00057 } 00058 00059 ~FieldDoc(){ 00060 if ( fields != NULL ){ 00061 for ( int i=0;fields[i]!=NULL;i++ ) 00062 _CLDELETE(fields[i]); 00063 _CLDELETE_ARRAY(fields); 00064 } 00065 } 00066 }; 00067 00068 CL_NS_END 00069 #endif 00070