LcsHashValOrd Class Reference

This class implements the hash value ordinal which is the index into the hash value nodes array stored in LcsHashTable class. More...

#include <LcsHash.h>

List of all members.

Public Member Functions

 LcsHashValOrd ()
 ~LcsHashValOrd ()
 LcsHashValOrd (LcsHashValOrd const &other)
LcsHashValOrdoperator= (uint16_t valOrdInit)
 Copy assignment.
uint16_t getValOrd ()
 Gets fields in LcsHashValOrd struct.
void setValOrd (uint16_t valOrdInit)
 Sets fields in LcsHashValOrd struct.
bool isValueInBatch ()
 Checks if this value node is part of the current batch.
void setValueInBatch ()
 Marks that this value node is part of the current batch.
void clearValueInBatch ()
 Marks that this value node is not part of the current batch.

Private Attributes

uint16_t valOrd
 Index into the value nodes array.


Detailed Description

This class implements the hash value ordinal which is the index into the hash value nodes array stored in LcsHashTable class.

The highest bit of the value is used to indicate whether this value is part of the current batch.

Definition at line 43 of file LcsHash.h.


Constructor & Destructor Documentation

LcsHashValOrd::LcsHashValOrd (  )  [inline]

Definition at line 54 of file LcsHash.h.

00054 {}

LcsHashValOrd::~LcsHashValOrd (  )  [inline]

Definition at line 55 of file LcsHash.h.

00055 {}

LcsHashValOrd::LcsHashValOrd ( LcsHashValOrd const &  other  )  [inline, explicit]

Definition at line 711 of file LcsHash.h.

References valOrd.

00712 {
00713     valOrd = other.valOrd;
00714 }


Member Function Documentation

LcsHashValOrd & LcsHashValOrd::operator= ( uint16_t  valOrdInit  )  [inline]

Copy assignment.

Used to cast an uint16_t to LcsHashValOrd.

Definition at line 716 of file LcsHash.h.

References setValOrd().

00717 {
00718     setValOrd(valOrdInit);
00719     return *this;
00720 }

uint16_t LcsHashValOrd::getValOrd (  )  [inline]

Gets fields in LcsHashValOrd struct.

The highest bit in the value ordinal indicates whether or not value is part of current batch.

Definition at line 722 of file LcsHash.h.

References valOrd.

Referenced by LcsClusterAppendExecStream::loadExistingBlock().

00723 {
00724     return (uint16_t)(valOrd & ~(1<<15));
00725 }

void LcsHashValOrd::setValOrd ( uint16_t  valOrdInit  )  [inline]

Sets fields in LcsHashValOrd struct.

The highest bit in the value ordinal indicates whether or not value is part of current batch.

Definition at line 727 of file LcsHash.h.

References valOrd.

Referenced by operator=().

00728 {
00729     valOrd = (valOrdInit & ~(1<<15));
00730 }

bool LcsHashValOrd::isValueInBatch (  )  [inline]

Checks if this value node is part of the current batch.

Definition at line 732 of file LcsHash.h.

References valOrd.

Referenced by LcsHash::insert().

00733 {
00734     return (valOrd & (1<<15));
00735 }

void LcsHashValOrd::setValueInBatch (  )  [inline]

Marks that this value node is part of the current batch.

Definition at line 737 of file LcsHash.h.

References valOrd.

Referenced by LcsHash::insert().

00738 {
00739     valOrd |= 1<<15;
00740 }

void LcsHashValOrd::clearValueInBatch (  )  [inline]

Marks that this value node is not part of the current batch.

Definition at line 742 of file LcsHash.h.

References valOrd.

00743 {
00744     valOrd &= ~(1<<15);
00745 }


Member Data Documentation

uint16_t LcsHashValOrd::valOrd [private]

Index into the value nodes array.

Definition at line 50 of file LcsHash.h.

Referenced by clearValueInBatch(), getValOrd(), isValueInBatch(), LcsHashValOrd(), setValOrd(), and setValueInBatch().


The documentation for this class was generated from the following file:
Generated on Mon Jun 22 04:00:37 2009 for Fennel by  doxygen 1.5.1