Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CLibraryDictionary Class Reference

#include <LibraryDictionary.h>

List of all members.

Public Member Functions

 CLibraryDictionary ()
virtual ~CLibraryDictionary ()
void Add (CLibraryFile *pFile)
void Remove (CLibraryFile *pFile)
BOOL BuildHashTable ()
void RebuildHashTable ()
CQueryHashTableGetHashTable ()
void Clear ()
CPtrList * Search (CQuerySearch *pSearch, int nMaximum=0, BOOL bLocal=FALSE)

Public Attributes

CQueryHashTablem_pTable

Protected Member Functions

void ProcessFile (CLibraryFile *pFile, BOOL bAdd)
int ProcessPhrase (CLibraryFile *pFile, const CString &strPhrase, BOOL bAdd, BOOL bLowercase=TRUE)
void ProcessWord (CLibraryFile *pFile, const CString &strWord, BOOL bAdd)

Protected Attributes

CMapStringToPtr m_pWords
BOOL m_bTable
DWORD m_nSearchCookie


Constructor & Destructor Documentation

CLibraryDictionary::CLibraryDictionary  ) 
 

Definition at line 54 of file LibraryDictionary.cpp.

References m_bTable, m_nSearchCookie, m_pTable, and NULL.

CLibraryDictionary::~CLibraryDictionary  )  [virtual]
 

Definition at line 62 of file LibraryDictionary.cpp.

References Clear(), and m_pTable.


Member Function Documentation

void CLibraryDictionary::Add CLibraryFile pFile  ) 
 

Definition at line 71 of file LibraryDictionary.cpp.

References CQueryHashTable::AddString(), BuildHashTable(), CED2K::HashToString(), CSHA::HashToString(), m_pTable, and ProcessFile().

Referenced by CLibrary::AddFile().

BOOL CLibraryDictionary::BuildHashTable  ) 
 

Definition at line 235 of file LibraryDictionary.cpp.

References CQueryHashTable::AddString(), CUploadQueues::CanUpload(), CQueryHashTable::Clear(), CQueryHashTable::Create(), CLibraryMaps::GetFileIterator(), CLibraryMaps::GetNextFile(), CED2K::HashToString(), CSHA::HashToString(), CLibraryFile::IsGhost(), CLibraryFile::IsShared(), LibraryMaps, CLibraryFile::m_bED2K, CLibraryFile::m_bSHA1, m_bTable, CLibraryFile::m_pED2K, CLibraryFile::m_pSHA1, m_pTable, m_pWords, NULL, PROTOCOL_HTTP, and UploadQueues.

Referenced by Add(), GetHashTable(), ProcessWord(), RebuildHashTable(), Search(), and CLibrary::ThreadScan().

void CLibraryDictionary::Clear  ) 
 

Definition at line 338 of file LibraryDictionary.cpp.

References CQueryHashTable::Clear(), m_bTable, m_pTable, m_pWords, and NULL.

Referenced by CLibrary::Clear(), and ~CLibraryDictionary().

CQueryHashTable * CLibraryDictionary::GetHashTable  ) 
 

Definition at line 326 of file LibraryDictionary.cpp.

References BuildHashTable(), Library, CLibrary::m_pSection, and m_pTable.

Referenced by CQueryHashMaster::Build().

void CLibraryDictionary::ProcessFile CLibraryFile pFile,
BOOL  bAdd
[protected]
 

Definition at line 101 of file LibraryDictionary.cpp.

References CLibraryFile::GetMetadataWords(), CLibraryFile::GetSearchName(), CLibraryFile::m_pMetadata, CLibraryFile::m_pSchema, CSchema::m_sURI, NULL, ProcessPhrase(), and ProcessWord().

Referenced by Add(), and Remove().

int CLibraryDictionary::ProcessPhrase CLibraryFile pFile,
const CString &  strPhrase,
BOOL  bAdd,
BOOL  bLowercase = TRUE
[protected]
 

Definition at line 116 of file LibraryDictionary.cpp.

References IsCharacter(), IsWord(), CSettings::Library, CSettings::sLibrary::PartialMatch, ProcessWord(), and Settings.

Referenced by ProcessFile().

void CLibraryDictionary::ProcessWord CLibraryFile pFile,
const CString &  strWord,
BOOL  bAdd
[inline, protected]
 

Definition at line 202 of file LibraryDictionary.cpp.

References CQueryHashTable::AddString(), BuildHashTable(), m_bTable, m_pTable, and m_pWords.

Referenced by ProcessFile(), and ProcessPhrase().

void CLibraryDictionary::RebuildHashTable  ) 
 

Definition at line 316 of file LibraryDictionary.cpp.

References BuildHashTable(), and m_bTable.

Referenced by CUploadsSettingsPage::OnOK().

void CLibraryDictionary::Remove CLibraryFile pFile  ) 
 

Definition at line 88 of file LibraryDictionary.cpp.

References m_bTable, and ProcessFile().

Referenced by CLibrary::RemoveFile().

CPtrList * CLibraryDictionary::Search CQuerySearch pSearch,
int  nMaximum = 0,
BOOL  bLocal = FALSE
 

Definition at line 361 of file LibraryDictionary.cpp.

References BuildHashTable(), CQueryHashTable::Check(), CLibraryFile::GetSearchName(), CLibraryFile::IsShared(), LibraryMaps, CLibraryMaps::LookupFile(), CLibraryFile::m_bED2K, CLibraryFile::m_bSHA1, CLibraryFile::m_bTiger, CLibraryFile::m_nCollIndex, CLibraryFile::m_nHitsToday, CLibraryFile::m_nHitsTotal, CLibraryFile::m_nSearchCookie, m_nSearchCookie, CLibraryFile::m_nSearchWords, CLibraryFile::m_nSize, CLibraryFile::m_pED2K, CLibraryFile::m_pMetadata, CLibraryFile::m_pNextHit, CLibraryFile::m_pSchema, CLibraryFile::m_pSHA1, m_pTable, CLibraryFile::m_pTiger, m_pWords, CSchema::m_sURI, and NULL.

Referenced by CLibrary::Search().


Member Data Documentation

BOOL CLibraryDictionary::m_bTable [protected]
 

Definition at line 45 of file LibraryDictionary.h.

Referenced by BuildHashTable(), Clear(), CLibraryDictionary(), ProcessWord(), RebuildHashTable(), and Remove().

DWORD CLibraryDictionary::m_nSearchCookie [protected]
 

Definition at line 46 of file LibraryDictionary.h.

Referenced by CLibraryDictionary(), and Search().

CQueryHashTable* CLibraryDictionary::m_pTable
 

Definition at line 42 of file LibraryDictionary.h.

Referenced by Add(), BuildHashTable(), Clear(), CLibraryDictionary(), GetHashTable(), ProcessWord(), Search(), and ~CLibraryDictionary().

CMapStringToPtr CLibraryDictionary::m_pWords [protected]
 

Definition at line 44 of file LibraryDictionary.h.

Referenced by BuildHashTable(), Clear(), ProcessWord(), and Search().


The documentation for this class was generated from the following files:
Generated on Thu Dec 15 10:40:08 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2