Defined in file: hzIntset.h

hzIntset holds a set of 32-bit unsigned integers. hzIntset instances are known as idsets because the hzIntset class is extensively used in the HDB, as container of HDB data object and datum ids. hzIntset can be configured to be persistent or volatile. In the HDB, persistent idsets are used in repositories and indexes, while volatile idsets are used for holding and processing search results. Volatile idsets are fully memory resident, which simplifies matters considerably. Depending on the population, the memory resident component either has the form of a single segment, or a map of segments. Persistent idsets also have a memory resident component. It is of limited size, is backed by a delta file, and has the primary objective of forestalling whole block writes. Due to the 4K block size and the compactness of idsets, a single block will typically contain thousands of ids. It makes no sense to write out a whole block each time an id is added or deleted.

This class employes the private sub-class _idset_ca as follows:-

_idset_ca

Constructors/Detructors

hzIntset*hzIntset(hzIntset& op)
hzIntset*hzIntset(void)
NULL-TYPEhzIntset(void)
void~hzIntset(void)
NULL-TYPE~hzIntset(void)

Public Methods:

voidClear(void)Clears the bitmap (removes all segments) Arguments: None Returns: None
uint32_tCount(void)
hzEcodeDelete(uint32_t nId)Delete a document/object id from the bitmap
uint32_tFetch(hzVect<uint32_t>& Result)uint32_t nStart, uint32_t nReq, Purpose: Fetch ids from the idset into an id buffer Note that the presumed scenario is that the idset will be a search result, which will not have a vector of nodes. The function is written however, to cope with a vector.
uint32_tInsert(uint32_t nId)Locate node, insert into node. If no nodes exist, the first is create.
uint32_tNoNodes(void)Reports the number of _idsNodes
voidShow(hzChain& Z)Export the idset. Be aware this can produce chains of several megabytes. Returns: None
_idsNode*_findNode(uint32_t nId)

Overloaded operators:

hzIntset&operator&=(hzIntset& op)AND this idset with the operand idset. Place the result in this idset.
ostream&operator<<(ostream& os)hzIntset& ids,
hzIntset&operator=(hzIntset& op)Assign a hzIntset instance to another. This will only facilitate a soft copy.
istream&operator>>(istream& is)hzIntset& ids,
booloperator[](uint32_t nId)Purpose: Deterermine if the supplied test id, exists within the idset
hzIntset&operator|=(hzIntset& op)Run through the nodes in the operand idset. Iterate each node using _readEUI, and insert everything found into the applicable node in this idset.

Member Variables:

hzIntset::_idset_ca*mxInternal instance