WordRecordInfo.cc

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 //
00009 // WordRecordInfo.cc
00010 //
00011 // WordRecord: data portion of the inverted index database
00012 //
00013 #ifdef HAVE_CONFIG_H
00014 #include "config.h"
00015 #endif /* HAVE_CONFIG_H */
00016 
00017 #include "Configuration.h"
00018 #include "WordRecordInfo.h"
00019 
00020 WordRecordInfo::WordRecordInfo(const Configuration & config)
00021 {
00022     default_type = WORD_RECORD_INVALID;
00023     const String & recorddesc = config["wordlist_wordrecord_description"];
00024     if (!recorddesc.nocase_compare("data")) {
00025         default_type = WORD_RECORD_DATA;
00026     } else if (!recorddesc.nocase_compare("str")) {
00027         default_type = WORD_RECORD_STR;
00028     } else if (!recorddesc.nocase_compare("none") || recorddesc.empty()) {
00029         default_type = WORD_RECORD_NONE;
00030     } else {
00031         fprintf(stderr,
00032                 "WordRecordInfo::WordRecordInfo: invalid wordlist_wordrecord_description: %s\n",
00033                 (const char *) recorddesc);
00034     }
00035 }

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