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_Explanation 00008 #define _lucene_search_Explanation 00009 00010 #include "CLucene/util/VoidMapSetDefinitions.h" 00011 00012 CL_NS_DEF(search) 00013 00014 #define LUCENE_SEARCH_EXPLANATION_DESC_LEN 200 00015 class CLUCENE_EXPORT Explanation :LUCENE_BASE { 00016 private: 00017 float_t value; // the value of this node 00018 TCHAR description[LUCENE_SEARCH_EXPLANATION_DESC_LEN]; // what it represents 00019 CL_NS(util)::CLArrayList<Explanation*,CL_NS(util)::Deletor::Object<Explanation> >* details; // sub-explanations 00020 00021 TCHAR* toString(int32_t depth); 00022 protected: 00023 Explanation(const Explanation& copy); 00024 public: 00025 Explanation(); 00026 ~Explanation(); 00027 00028 Explanation(float_t value, const TCHAR* description); 00029 void set(const Explanation& other); 00030 00031 Explanation* clone() const; 00032 00034 float_t getValue() const; 00035 00037 void setValue(float_t value); 00038 00040 const TCHAR* getDescription() const; 00041 00043 void setDescription(const TCHAR* description); 00044 00049 void getDetails(Explanation** ret); 00050 int getDetailsLength(); 00051 Explanation* getDetail(int i); 00052 00054 void addDetail(Explanation* detail); 00055 00057 TCHAR* toString(); 00058 00060 TCHAR* toHtml(); 00061 }; 00062 00063 CL_NS_END 00064 #endif