Public Member Functions | Private Attributes | List of all members
IndexWord Class Reference

#include <searchindex.h>

Public Member Functions

 IndexWord (const char *word)
 
void addUrlIndex (int, bool)
 
const QIntDict< URLInfo > & urls () const
 
QCString word () const
 

Private Attributes

QCString m_word
 
QIntDict< URLInfom_urls
 

Detailed Description

Definition at line 56 of file searchindex.h.

Constructor & Destructor Documentation

IndexWord::IndexWord ( const char *  word)

Definition at line 56 of file searchindex.cpp.

56  : m_word(word), m_urls(17)
57 {
59  //printf("IndexWord::IndexWord(%s)\n",word);
60 }
QCString word() const
Definition: searchindex.h:62
QIntDict< URLInfo > m_urls
Definition: searchindex.h:66
void setAutoDelete(bool enable)
Definition: qcollection.h:55
QCString m_word
Definition: searchindex.h:65
const bool TRUE
Definition: qglobal.h:371

Member Function Documentation

void IndexWord::addUrlIndex ( int  idx,
bool  hiPriority 
)

Definition at line 62 of file searchindex.cpp.

63 {
64  //printf("IndexWord::addUrlIndex(%d,%d)\n",idx,hiPriority);
65  URLInfo *ui = m_urls.find(idx);
66  if (ui==0)
67  {
68  //printf("URLInfo::URLInfo(%d)\n",idx);
69  ui=new URLInfo(idx,0);
70  m_urls.insert(idx,ui);
71  }
72  ui->freq+=2;
73  if (hiPriority) ui->freq|=1; // mark as high priority document
74 }
QIntDict< URLInfo > m_urls
Definition: searchindex.h:66
void insert(long k, const type *d)
Definition: qintdict.h:57
int freq
Definition: searchindex.h:53
type * find(long k) const
Definition: qintdict.h:63
const QIntDict<URLInfo>& IndexWord::urls ( ) const
inline

Definition at line 61 of file searchindex.h.

61 { return m_urls; }
QIntDict< URLInfo > m_urls
Definition: searchindex.h:66
QCString IndexWord::word ( ) const
inline

Definition at line 62 of file searchindex.h.

62 { return m_word; }
QCString m_word
Definition: searchindex.h:65

Member Data Documentation

QIntDict<URLInfo> IndexWord::m_urls
private

Definition at line 66 of file searchindex.h.

QCString IndexWord::m_word
private

Definition at line 65 of file searchindex.h.


The documentation for this class was generated from the following files: