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

dbm::idbm_t Class Reference

#include <inline_fed.h>

List of all members.

Public Types

enum  { HASHED_BIT = (1 << 31), HASH_MASK = ~(HASHED_BIT | dbm_t::MAX_DIM), DIM_MASK = dbm_t::MAX_DIM }
 Maximal dimension == 2^15-1 because (2^15)^2 == 2^30 constraints == 2^32 bytes and we are in big big trouble then. More...

Public Member Functions

cindex_t getDimension () const
uint32_t hash (uint32_t seed=0) const
bool isHashed () const
bool isMutable () const
bool tryMutable ()
 Check if this dimPtr is mutable and try to make it so cheaply.
void unhash ()
 Unhash itself.
uint32_t updateHash (uint32_t seed=0)
void markHashed ()
 Mark 'this' as hashed.
void unmarkHashed ()
 Unmark 'this' as hashed.
void incRef ()
 Increment reference counter.
void decRef ()
 Decrement reference counter.
void decRefImmutable ()
 Simple decRef without remove().
void removeMutable ()
 Simple remove for mutable idbm_t.
void remove ()
 Deallocate this idbm_t.
raw_tdbm ()
const raw_tconst_dbm () const
raw_tgetMatrix ()
 idbm_t (cindex_t dim)
 Constructor: use placement constructor to instantiate.
 idbm_t (const idbm_t &original)
 Constructor by copy: useful to get a mutable copy of this DBM.

Static Public Member Functions

static idbm_tcreate (cindex_t dim)
static idbm_tcreate (const idbm_t &arg)

Private Member Functions

 ~idbm_t ()
 Must never be called.

Private Attributes

uint32_t refCounter
raw_t matrix []


Member Enumeration Documentation

anonymous enum
 

Maximal dimension == 2^15-1 because (2^15)^2 == 2^30 constraints == 2^32 bytes and we are in big big trouble then.

MAX_DIM is the maximum dimension *and* the access mask. HASH_MASK contains the remaining bits for the hash value HASHED_BIT mark if this DBM is in a hash tabled (hashed).

Enumeration values:
HASHED_BIT 
HASH_MASK 
DIM_MASK 


Constructor & Destructor Documentation

dbm::idbm_t::idbm_t cindex_t  dim  )  [inline]
 

Constructor: use placement constructor to instantiate.

Parameters:
dim,: dimension of the DBM.
Precondition:
dim < 2^16, reasonable since such a DBM would have 2^32 elements and we cannot use a single such DBM.
Postcondition:
DBM is not initialized!

dbm::idbm_t::idbm_t const idbm_t original  )  [inline]
 

Constructor by copy: useful to get a mutable copy of this DBM.

Parameters:
original,: DBM to copy.

dbm::idbm_t::~idbm_t  )  [inline, private]
 

Must never be called.


Member Function Documentation

const raw_t* dbm::idbm_t::const_dbm  )  const [inline]
 

Returns:
read-only DBM matrix.

static idbm_t* dbm::idbm_t::create const idbm_t arg  )  [inline, static]
 

Returns:
newly allocated idbm_t,
Parameters:
arg,: original to copy.

static idbm_t* dbm::idbm_t::create cindex_t  dim  )  [inline, static]
 

Returns:
newly allocated idbm_t,
Parameters:
dim,: DBM dimension.

raw_t* dbm::idbm_t::dbm  )  [inline]
 

Returns:
writable DBM matrix,
Precondition:
isMutable()

void dbm::idbm_t::decRef  )  [inline]
 

Decrement reference counter.

Postcondition:
'this' may be deallocated.

void dbm::idbm_t::decRefImmutable  )  [inline]
 

Simple decRef without remove().

Precondition:
refCounter > 1

cindex_t dbm::idbm_t::getDimension  )  const [inline]
 

Returns:
dimension of this DBM.

raw_t* dbm::idbm_t::getMatrix  )  [inline]
 

Returns:
DBM matrix without pre-condition, careful...

uint32_t dbm::idbm_t::hash uint32_t  seed = 0  )  const [inline]
 

Returns:
a freshly computed hash value

void dbm::idbm_t::incRef  )  [inline]
 

Increment reference counter.

bool dbm::idbm_t::isHashed  )  const [inline]
 

Returns:
true if this DBM is in a hash table

bool dbm::idbm_t::isMutable  )  const [inline]
 

Returns:
true if this dbm can be modified.

void dbm::idbm_t::markHashed  )  [inline]
 

Mark 'this' as hashed.

void dbm::idbm_t::remove  ) 
 

Deallocate this idbm_t.

Precondition:
refCounter == 0 Not inlined since the call is present very often for every decRef, where decRef is called for garbage collection.

void dbm::idbm_t::removeMutable  )  [inline]
 

Simple remove for mutable idbm_t.

Precondition:
isMutable()

bool dbm::idbm_t::tryMutable  )  [inline]
 

Check if this dimPtr is mutable and try to make it so cheaply.

void dbm::idbm_t::unhash  )  [inline]
 

Unhash itself.

Precondition:
refCounter == 1 && isHashed()

void dbm::idbm_t::unmarkHashed  )  [inline]
 

Unmark 'this' as hashed.

uint32_t dbm::idbm_t::updateHash uint32_t  seed = 0  )  [inline]
 

Returns:
recomputed hash value for this DBM and save it partially.


Member Data Documentation

raw_t dbm::idbm_t::matrix[] [private]
 

uint32_t dbm::idbm_t::refCounter [private]
 


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