mifluzsearch.h

Go to the documentation of this file.
00001 //
00002 // Part of the ht://Dig package   <http://www.htdig.org/>
00003 // Copyright (c) 1999, 2000, 2001 The ht://Dig Group
00004 // For copyright details, see the file COPYING in your distribution
00005 // or the GNU General Public License version 2 or later
00006 // <http://www.gnu.org/copyleft/gpl.html>
00007 //
00008 // $Id: mifluzsearch_8h-source.html,v 1.1 2008/06/08 10:20:35 sebdiaz Exp $
00009 //
00010 #ifndef _mifluzsearch_h
00011 #define _mifluzsearch_h
00012 
00013 #include <stdlib.h>
00014 
00015 #include <htString.h>
00016 #include <WordList.h>
00017 #include <StringList.h>
00018 
00019 #include <WordTree.h>
00020 
00021 #define WORD_SEARCH_OR          0x01
00022 #define WORD_SEARCH_OPTIONAL    0x02
00023 
00024 class MifluzSearchInput {
00025  public:
00026   inline MifluzSearchInput() {
00027     buffer = 0;
00028     buffer_length = 0;
00029     or_method = WORD_SEARCH_OPTIONAL;
00030 
00031     pointer = 0;
00032 
00033     charset = "ISO-8859-1";
00034     words = 0;
00035     verbose = 0;
00036   }
00037   inline ~MifluzSearchInput() {
00038     if(buffer) free(buffer);
00039   }
00040 
00041   inline int BufferSet(char* bufferp, int bufferp_length) {
00042     buffer_length = bufferp_length;
00043     buffer = (char*)malloc(buffer_length + 1);
00044     memcpy(buffer, bufferp, buffer_length);
00045     buffer[buffer_length] = '\0';
00046     return 0;
00047   }
00048 
00049   inline int Verbose(int verbosity) { return verbose = verbosity; }
00050  
00051   char* buffer;
00052   int buffer_length;
00053   int buffer_size;
00054   int or_method;
00055 
00056   int pointer;
00057 
00058   StringList words_verbatim;
00059   StringList words_unaccent;
00060 
00061   WordTree* query;
00062 
00063   char* charset;
00064   int maximum_word_length;
00065   WordList* words;
00066   int verbose;
00067 };
00068 
00069 int search_parse(void* inputp);
00070 
00071 #endif /* _mifluzsearch_h */

Generated on Sun Jun 8 10:56:40 2008 for GNUmifluz by  doxygen 1.5.5