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

Cache Class Reference

#include <Cache.h>

List of all members.

Public Member Functions

 Cache (const std::string &filename) throw (std::runtime_error)
virtual ~Cache ()
virtual CacheResult get (const Url &url) const
virtual void addRir (const UrlRange &nr, const std::string &rir) throw (std::runtime_error)
virtual void add (const ZeWhois::WhoisList &lst) throw (std::runtime_error)
virtual void remove (const UrlRange &range)
virtual const CacheMap & getTree () const
void save () throw (std::runtime_error)

Private Member Functions

void initTree () throw (std::runtime_error)
void checkVersion (const DocumentPtr &) throw (std::runtime_error)
void recursiveBuild (const NodeListPtr &elements, CacheMap &_map) const throw (std::runtime_error)
CacheEntry * createEntry (const ElementPtr &el) const throw (std::runtime_error)
void recursiveFind (const Url &url, const CacheMap &_map, CacheResult &cr) const throw (std::runtime_error)
void writeLock ()

Static Private Member Functions

static UrlRange getRange (const ElementPtr &el) throw (std::runtime_error)
static CacheMap::const_iterator fastfind (const UrlRange &range, const CacheMap &_map)
static CacheMap::iterator fastfind (const UrlRange &range, CacheMap &_map)
static CacheMap::const_iterator fastfind (const Url &url, const CacheMap &_map)
static void recursiveSave (ElementPtr &pEl, const CacheMap &_map) throw (std::runtime_error)
static void recursiveAdd (const UrlRange &range, const InternalCacheEntry *pEntry, CacheMap &_map) throw (std::runtime_error)
static void recursiveDelete (const UrlRange &range, CacheMap &_map)

Private Attributes

CacheMap m_head
std::string m_filename
std::string m_path
CriticalSection m_mutex
int m_nReads
bool m_bDirty

Constructor & Destructor Documentation

Cache::Cache const std::string &  filename  )  throw (std::runtime_error)

Cache::~Cache  )  [virtual]

Member Function Documentation

void Cache::add const ZeWhois::WhoisList &  lst  )  throw (std::runtime_error) [virtual]

void Cache::addRir const UrlRange &  nr,
const std::string &  rir
throw (std::runtime_error) [virtual]

void Cache::checkVersion const DocumentPtr  )  throw (std::runtime_error) [private]

CacheEntry * Cache::createEntry const ElementPtr el  )  const throw (std::runtime_error) [private]

CacheMap::const_iterator Cache::fastfind const Url &  url,
const CacheMap &  _map
[static, private]

CacheMap::iterator Cache::fastfind const UrlRange &  range,
CacheMap &  _map
[static, private]

CacheMap::const_iterator Cache::fastfind const UrlRange &  range,
const CacheMap &  _map
[static, private]

WhoisCache::CacheResult Cache::get const Url &  url  )  const [virtual]

UrlRange Cache::getRange const ElementPtr el  )  throw (std::runtime_error) [static, private]

const CacheMap & Cache::getTree  )  const [virtual]

void Cache::initTree  )  throw (std::runtime_error) [private]

void Cache::recursiveAdd const UrlRange &  range,
const InternalCacheEntry pEntry,
CacheMap &  _map
throw (std::runtime_error) [static, private]

void Cache::recursiveBuild const NodeListPtr elements,
CacheMap &  _map
const throw (std::runtime_error) [private]

void Cache::recursiveDelete const UrlRange &  range,
CacheMap &  _map
[static, private]

void Cache::recursiveFind const Url &  url,
const CacheMap &  _map,
CacheResult &  cr
const throw (std::runtime_error) [private]

void Cache::recursiveSave ElementPtr pEl,
const CacheMap &  _map
throw (std::runtime_error) [static, private]

void Cache::remove const UrlRange &  range  )  [virtual]

void Cache::save  )  throw (std::runtime_error)

void Cache::writeLock  )  [private]

Member Data Documentation

bool Cache::m_bDirty [private]

std::string Cache::m_filename [private]

CacheMap Cache::m_head [private]

CriticalSection Cache::m_mutex [mutable, private]

int Cache::m_nReads [mutable, private]

std::string Cache::m_path [private]

The documentation for this class was generated from the following files:
Generated on Thu Jun 16 00:13:25 2005 for Abuse! by  doxygen 1.4.3