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

Table< K, V >::Default Class Reference

#include <Table.H>

Inheritance diagram for Table< K, V >::Default:

RootTbl ShortIdRefCount List of all members.

Public Member Functions

 Default (int sizeHint=0, bool useGC=false) throw ()
 Default (const Default *tbl, bool useGC=false) throw ()
 ~Default () throw ()
void Init (Bit32 sizeHint=0U) throw ()
Defaultoperator= (const Default &tbl) throw ()
int Size () const throw ()
bool Get (const K &k, V &v) const throw ()
bool Put (const K &k, const V &v, bool resize=true) throw ()
bool Delete (const K &k, V &v, bool resize=true) throw ()
void Resize () throw ()

Private Types

typedef EntryListEntryListPtr

Private Member Functions

void NewBuckets (bool allocBuckets) throw ()
void AllocBuckets (Bit32 numBuckets) throw ()
void EmptyBuckets (Bit32 numBuckets) throw ()
void Rehash (Bit16 logBuckets) throw ()
Bit32 Bucket (const K &k) const throw ()
void Copy (const Default *tbl) throw ()
 Default (const Default &)

Private Attributes

Bit32 numEntries
Bit32 minEntries
Bit32 maxEntries
Bit16 logBuckets
Bit16 minLogBuckets
EntryListPtrbuckets

Friends

class Iterator

Classes

class  EntryList

template<class K, class V>
class Table< K, V >::Default


Member Typedef Documentation

template<class K, class V>
typedef EntryList* Table< K, V >::Default::EntryListPtr [private]
 

Definition at line 176 of file Table.H.


Constructor & Destructor Documentation

template<class K, class V>
Table< K, V >::Default::Default int  sizeHint = 0,
bool  useGC = false
throw () [inline]
 

Definition at line 118 of file Table.H.

References Table< K, V >::Default::Init().

template<class K, class V>
Table< K, V >::Default::Default const Default tbl,
bool  useGC = false
throw () [inline]
 

Definition at line 130 of file Table.H.

References Table< K, V >::Default::Copy(), Table< K, V >::Default::Init(), and Table< K, V >::Default::numEntries.

template<class K, class V>
Table< K, V >::Default::~Default  )  throw ()
 

Definition at line 301 of file Table.H.

References Table< K, V >::Default::buckets, Table< K, V >::Default::logBuckets, and Table< K, V >::Default::EntryList::tail.

template<class K, class V>
Table< K, V >::Default::Default const Default  )  [private]
 


Member Function Documentation

template<class K, class V>
void Table< K, V >::Default::AllocBuckets Bit32  numBuckets  )  throw () [private]
 

Definition at line 341 of file Table.H.

References NEW_ARRAY.

template<class K, class V>
Bit32 Table< K, V >::Default::Bucket const K &  k  )  const throw () [inline, private]
 

Definition at line 357 of file Table.H.

template<class K, class V>
void Table< K, V >::Default::Copy const Default tbl  )  throw () [private]
 

Definition at line 268 of file Table.H.

References Table< K, V >::Iterator::Next().

Referenced by Table< K, V >::Default::Default(), and Table< K, V >::Default::operator=().

template<class K, class V>
bool Table< K, V >::Default::Delete const K &  k,
V &  v,
bool  resize = true
throw ()
 

Definition at line 453 of file Table.H.

References Table< K, V >::Default::EntryList::key, Table< K, V >::Default::EntryList::tail, and Table< K, V >::Default::EntryList::val.

Referenced by ShortIdRefCount::Compare(), DupeTable::completed_rpc(), ShortIdRefCount::Decrement(), RunToolCalls::Delete(), VMultiPKFile::Delete(), DeleteDirShortId(), VDirVolatileRoot::deleteIndex(), GardenerThread(), StatCount::PrintTrouble(), StatCount::PruneTroubleEntries(), RenewShortIdBlock(), and RecursiveStats::resetAll().

template<class K, class V>
void Table< K, V >::Default::EmptyBuckets Bit32  numBuckets  )  throw () [private]
 

Definition at line 349 of file Table.H.

template<class K, class V>
bool Table< K, V >::Default::Get const K &  k,
V &  v
const throw ()
 

Definition at line 411 of file Table.H.

References Table< K, V >::Default::EntryList::key, Table< K, V >::Default::EntryList::tail, and Table< K, V >::Default::EntryList::val.

Referenced by AcquireShortIdBlock(), Proc_Totals::add_call(), StatCount::AddTroubleEntry(), Histogram::AddVal(), AccessControl::admit(), CallCache(), VDirChangeable::collapse(), DupeTable::completed_rpc(), Call_Data::compute_interval_times(), Weeder::CopyGLtoPending(), ShortIdRefCount::Decrement(), AccessControl::UnixIdentityRep::fill_caches(), AccessControl::GlobalIdentityRep::fill_caches(), filterListCallback(), RunToolCalls::Get(), VMultiPKFile::Get(), ShortIdRefCount::GetCount(), GetDirShortId(), AccessControl::globalToUnixGroup(), AccessControl::globalToUnixUser(), ShortIdRefCount::Increment(), Atom::Init(), VDirVolatileRoot::list(), VDirChangeable::list(), VestaAttribs::listAttribs(), VDirVolatileRoot::lookup(), VDirVolatileRoot::lookupIndex(), VDirVolatileRoot::lookupIndexAndLock(), main(), VDirChangeable::measureDirectory(), Proc_Totals::merge(), DupeTable::new_rpc(), NewDirShortId(), Interval_Count_Greater::operator()(), Interval_Time_Greater::operator()(), operator+=(), Histogram::operator+=(), Histogram::PrintHisto(), Weeder::PruneGraphLog(), StatCount::PruneTroubleEntries(), recv_dir(), VestaConfig::get(), VestaConfig::is_set(), VestaConfig::section_vars(), RecursiveStats::visitDir(), and RecursiveStats::visitFile().

template<class K, class V>
void Table< K, V >::Default::Init Bit32  sizeHint = 0U  )  throw ()
 

Definition at line 283 of file Table.H.

References Ceiling, Log_2(), and max().

Referenced by CacheS_DoFreeMPKFiles(), Table< K, V >::Default::Default(), DeleteAllDirShortIds(), main(), and Table< K, V >::Default::operator=().

template<class K, class V>
void Table< K, V >::Default::NewBuckets bool  allocBuckets  )  throw () [private]
 

Definition at line 322 of file Table.H.

References Round.

template<class K, class V>
Default& Table< K, V >::Default::operator= const Default tbl  )  throw () [inline]
 

Definition at line 145 of file Table.H.

References Table< K, V >::Default::Copy(), and Table< K, V >::Default::Init().

template<class K, class V>
bool Table< K, V >::Default::Put const K &  k,
const V &  v,
bool  resize = true
throw ()
 

Definition at line 428 of file Table.H.

References Table< K, V >::Default::EntryList::key, NEW_CONSTR, Table< K, V >::Default::EntryList::tail, and Table< K, V >::Default::EntryList::val.

Referenced by AcquireShortIdBlock(), Proc_Totals::add_call(), StatCount::AddTroubleEntry(), Histogram::AddVal(), AccessControl::admit(), AtomInit::AtomInit(), CallCache(), VDirChangeable::collapse(), Call_Data::compute_interval_times(), Weeder::CopyGLtoPending(), VDirVolatileRoot::createVolatileDirectory(), ShortIdRefCount::Decrement(), ShortIdRefCount::Increment(), Atom::Init(), VDirChangeable::list(), VestaAttribs::listAttribs(), DirInfos::LookupDir(), main(), VDirChangeable::measureDirectory(), Proc_Totals::merge(), DupeTable::new_rpc(), NewDirShortId(), operator+=(), Histogram::operator+=(), operator-(), Weeder::PruneGraphLog(), StatCount::PruneTroubleEntries(), RunToolCalls::Put(), VMultiPKFile::Put(), RenewShortIdBlock(), RunTool(), SetDirShortId(), RecursiveStats::visitDir(), RecursiveStats::visitFile(), and Weeder::WeededPrefixes().

template<class K, class V>
void Table< K, V >::Default::Rehash Bit16  logBuckets  )  throw () [private]
 

Definition at line 363 of file Table.H.

References Table< K, V >::Default::EntryList::key, and Table< K, V >::Default::EntryList::tail.

Referenced by Table< K, V >::Default::Resize().

template<class K, class V>
void Table< K, V >::Default::Resize  )  throw ()
 

Definition at line 397 of file Table.H.

References Table< K, V >::Default::Rehash().

template<class K, class V>
int Table< K, V >::Default::Size  )  const throw () [inline]
 

Definition at line 150 of file Table.H.

References Table< K, V >::Default::numEntries.

Referenced by DeleteAllDirShortIds(), RecursiveStats::empty(), CacheS::FlushAll(), GardenerThread(), main(), VMultiPKFile::NumVPKFiles(), StatCount::PruneTroubleEntries(), Weeder::RecoverMiscVars(), ReposRoots::Scan(), VPKFile::Update(), and Weeder::WriteMiscVars().


Friends And Related Function Documentation

template<class K, class V>
friend class Iterator [friend]
 

Reimplemented in ShortIdRefCount.

Definition at line 221 of file Table.H.


Member Data Documentation

template<class K, class V>
EntryListPtr* Table< K, V >::Default::buckets [private]
 

Definition at line 183 of file Table.H.

Referenced by Table< K, V >::Default::~Default().

template<class K, class V>
Bit16 Table< K, V >::Default::logBuckets [private]
 

Definition at line 181 of file Table.H.

Referenced by Table< K, V >::Default::~Default().

template<class K, class V>
Bit32 Table< K, V >::Default::maxEntries [private]
 

Definition at line 180 of file Table.H.

template<class K, class V>
Bit32 Table< K, V >::Default::minEntries [private]
 

Definition at line 179 of file Table.H.

template<class K, class V>
Bit16 Table< K, V >::Default::minLogBuckets [private]
 

Definition at line 182 of file Table.H.

template<class K, class V>
Bit32 Table< K, V >::Default::numEntries [private]
 

Definition at line 178 of file Table.H.

Referenced by Table< K, V >::Default::Default(), and Table< K, V >::Default::Size().


The documentation for this class was generated from the following file:
Generated on Mon May 8 00:49:14 2006 for Vesta by  doxygen 1.4.2