My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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.

References m_urls.

: m_word(word), m_urls(17)
{
m_urls.setAutoDelete(TRUE);
//printf("IndexWord::IndexWord(%s)\n",word);
}

Member Function Documentation

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

Definition at line 62 of file searchindex.cpp.

References URLInfo::freq, and m_urls.

Referenced by SearchIndex::addWord().

{
//printf("IndexWord::addUrlIndex(%d,%d)\n",idx,hiPriority);
URLInfo *ui = m_urls.find(idx);
if (ui==0)
{
//printf("URLInfo::URLInfo(%d)\n",idx);
ui=new URLInfo(idx,0);
m_urls.insert(idx,ui);
}
ui->freq+=2;
if (hiPriority) ui->freq|=1; // mark as high priority document
}
const QIntDict<URLInfo>& IndexWord::urls ( ) const
inline

Definition at line 61 of file searchindex.h.

References m_urls.

Referenced by SearchIndex::write().

{ return m_urls; }
QCString IndexWord::word ( ) const
inline

Definition at line 62 of file searchindex.h.

References m_word.

Referenced by SearchIndex::write().

{ return m_word; }

Member Data Documentation

QIntDict<URLInfo> IndexWord::m_urls
private

Definition at line 66 of file searchindex.h.

Referenced by addUrlIndex(), IndexWord(), and urls().

QCString IndexWord::m_word
private

Definition at line 65 of file searchindex.h.

Referenced by word().


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