bitmap_digest Class Reference
[Digests]

#include <BitmapDigest.h>

Inheritance diagram for bitmap_digest:

Inheritance graph
[legend]
Collaboration diagram for bitmap_digest:

Collaboration graph
[legend]

List of all members.


Detailed Description

a correct and complete digest over the range it is currently supported.

The range updates automatically to handle new inserts. As new inserts are added to the bitmap, the range is rolled forward to include the new value in the range. Earlier entries are zeroed out and forgotten. A bit position can always be computed as the modulus in the size of the digest.

Definition at line 76 of file BitmapDigest.h.


Public Member Functions

bool contains (int item)
 check to see if an item is in the digest
int insert (int item, int suppress=1)
 inserts an item
void serialize (unsigned char *buffer)
 serializes the digest into the buffer
void import (unsigned char *buffer)
 deserializes the buffer into the digest
int size_compacted_in_bytes ()
 returns the size of the digest in bytes (for serialization)
void reset ()
 resets the digest to empty
int get_lowest_sequence ()
 returns the lowest sequence represented (yes or no) in the digest

Public Attributes

flat_bitmap bm
 the actual storage of the bitmap

Member Function Documentation

int bitmap_digest::insert ( int  item,
int  suppress = 1 
) [virtual]

inserts an item

Parameters:
item the item to insert
suppress when feasible, tells the filter whether to suppress dropping values
Returns:
returning the lowest sequence number remaining in the digest (even after truncation)

Implements digest.

Definition at line 106 of file BitmapDigest.cc.

References ADD_FUNC_SELECTORS, bm, contains(), bitmapy::last_seq, maceDebug, bitmapy::start_seq, and bitmapy::tab_size.

void bitmap_digest::serialize ( unsigned char *  buffer  )  [virtual]

serializes the digest into the buffer

Warning:
if the digest is to be continue being used, this should be replaced with basic mace serialization.

Implements digest.

Definition at line 168 of file BitmapDigest.cc.

References bm.

void bitmap_digest::import ( unsigned char *  buffer  )  [virtual]

deserializes the buffer into the digest

Warning:
if the digest is to be continue being used, this should be replaced with basic mace serialization.

Implements digest.

Definition at line 182 of file BitmapDigest.cc.

References bm.


The documentation for this class was generated from the following files:

Generated on Sat Oct 4 21:30:26 2008 for Mace Library by  doxygen 1.5.5