Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

lemur::utility::TermCache Class Reference

#include <TermCache.hpp>

List of all members.

Public Member Functions

 TermCache ()
void add (const char *term, int termID)
 add a term to the cache.

int find (const char *term) const
 lookup a term in the cache. Returns internal termid or -1 if not found.

void clear ()
 clear the cache.


Private Member Functions

int _hashFunction (const char *term) const

Private Attributes

cache_entry _termCache [TERMCACHE_SIZE/sizeof(struct cache_entry)]


Detailed Description

External to internal term id hash table for optimizing indexing with KeyfileIncIndex.


Constructor & Destructor Documentation

lemur::utility::TermCache::TermCache  ) 
 


Member Function Documentation

int lemur::utility::TermCache::_hashFunction const char *  term  )  const [private]
 

void lemur::utility::TermCache::add const char *  term,
int  termID
 

add a term to the cache.

void lemur::utility::TermCache::clear  ) 
 

clear the cache.

int lemur::utility::TermCache::find const char *  term  )  const
 

lookup a term in the cache. Returns internal termid or -1 if not found.


Member Data Documentation

struct cache_entry lemur::utility::TermCache::_termCache[ TERMCACHE_SIZE / sizeof (struct cache_entry) ] [private]
 


The documentation for this class was generated from the following files:
Generated on Tue Jun 15 11:03:07 2010 for Lemur by doxygen 1.3.4