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

dbm::partition_t::fedtable_t Class Reference

The federation table (a simple hash table with chained collisions on the table entries) to access the subsets (fed_t) of the partition. More...

List of all members.

Public Member Functions

fedtable_tcopy ()
void incRef ()
void decRef ()
bool isMutable ()
entry_t ** getTable ()
 Access methods.
const entry_t *const * getBeginTable () const
const entry_t *const * getEndTable () const
cindex_t getDimension () const
size_t getSize () const
void remove ()
 Remove (deallocate) this fedTable.
fed_t get (uint32_t id) const
bool add (uint32_t id, fed_t &fed)
 Add a federation to the subset 'id' of the partition.
fedtable_tlarger ()
size_t getNumberOfDBMs () const

Static Public Member Functions

static fedtable_tcreate (cindex_t dim)

Private Types

enum  { INIT_POWER = 1, INIT_SIZE = (1 << INIT_POWER), INIT_MASK = (INIT_SIZE - 1) }
 Constants for initialization. More...

Private Member Functions

 fedtable_t (cindex_t d, size_t nb, uint32_t m)
 Private constructors because the allocation is special.
 fedtable_t (cindex_t d)
 Default initial constructor.

Private Attributes

uint32_t refCounter
fed_t all
size_t nbEntries
uint32_t mask
entry_ttable []


Detailed Description

The federation table (a simple hash table with chained collisions on the table entries) to access the subsets (fed_t) of the partition.


Member Enumeration Documentation

anonymous enum [private]
 

Constants for initialization.

Enumeration values:
INIT_POWER 
INIT_SIZE 
INIT_MASK 


Constructor & Destructor Documentation

dbm::partition_t::fedtable_t::fedtable_t cindex_t  d,
size_t  nb,
uint32_t  m
[inline, private]
 

Private constructors because the allocation is special.

dbm::partition_t::fedtable_t::fedtable_t cindex_t  d  )  [inline, private]
 

Default initial constructor.


Member Function Documentation

bool dbm::partition_t::fedtable_t::add uint32_t  id,
fed_t fed
 

Add a federation to the subset 'id' of the partition.

Returns:
true if this table must be resized.

fedtable_t* dbm::partition_t::fedtable_t::copy  ) 
 

Precondition:
!isMutable() or it is stupid to call this
Postcondition:
refCounter is decremented

static fedtable_t* dbm::partition_t::fedtable_t::create cindex_t  dim  )  [static]
 

void dbm::partition_t::fedtable_t::decRef  )  [inline]
 

fed_t dbm::partition_t::fedtable_t::get uint32_t  id  )  const
 

Returns:
the fed_t corresponding to the partition's subset id. The federation is empty if the subset id is not defined.

const entry_t* const* dbm::partition_t::fedtable_t::getBeginTable  )  const [inline]
 

cindex_t dbm::partition_t::fedtable_t::getDimension  )  const [inline]
 

const entry_t* const* dbm::partition_t::fedtable_t::getEndTable  )  const [inline]
 

size_t dbm::partition_t::fedtable_t::getNumberOfDBMs  )  const
 

Returns:
total number of DBMs.

size_t dbm::partition_t::fedtable_t::getSize  )  const [inline]
 

entry_t** dbm::partition_t::fedtable_t::getTable  )  [inline]
 

Access methods.

void dbm::partition_t::fedtable_t::incRef  )  [inline]
 

bool dbm::partition_t::fedtable_t::isMutable  )  [inline]
 

fedtable_t* dbm::partition_t::fedtable_t::larger  ) 
 

Returns:
a resized table.
Precondition:
isMutable()
Postcondition:
this table is deallocated.

void dbm::partition_t::fedtable_t::remove  ) 
 

Remove (deallocate) this fedTable.

Precondition:
refCounter == 0.


Member Data Documentation

fed_t dbm::partition_t::fedtable_t::all [private]
 

uint32_t dbm::partition_t::fedtable_t::mask [private]
 

size_t dbm::partition_t::fedtable_t::nbEntries [private]
 

uint32_t dbm::partition_t::fedtable_t::refCounter [private]
 

entry_t* dbm::partition_t::fedtable_t::table[] [private]
 


The documentation for this class was generated from the following file:
Generated on Fri Jun 30 00:02:47 2006 for Module dbm by  doxygen 1.4.2