Defined in file: hzDatabase.h

hdbBinRepos: Binary Datum Repository

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

_datum_hd

Constructors/Detructors

hdbBinRepos*hdbBinRepos(hdbBinRepos&)
hdbBinRepos*hdbBinRepos(hdbADP& adp)
NULL-TYPEhdbBinRepos(hdbADP& adp)
void~hdbBinRepos(void)
NULL-TYPE~hdbBinRepos(void)

Public Methods:

hzEcodeClose(void)Close the Binary Repository. Arguments: None
uint32_tCount(void)
hzEcodeDelete(uint32_t datumId)Delete an object from the datacron. This function appears only for consistency with the base class and does nothing.
hzEcodeFetch(hzChain& datum)uint32_t datumId, Purpose: Fetches a single row of data into the supplied object.
boolIState(void)
hzEcodeInit(hzString& name)hzString& opdir, Initialize the hdbBinRepos instance. This ensures the working directory exists and both the index and data file exist. Note that this function does not leave index or data files open. This is left to hdbBinRepos::Open() as a separate step. Errors: Any false return is due to an irrecoverable error. The calling function must check the return value.
hzEcodeInsert(uint32_t& datumId)hzChain& datum, Insert the supplied datum (hzChain content) into the repository and set the supplied datum id in respect of the datum. This is a matter of appending the data file of the current partition with the datum, and of appending the index file of the current partition with the datum metadata. Purpose: Insert data contained in the supplied row source. This could be any of the row source classes. This function is for mass import
hzEcodeInsert(uint32_t& datumId)hzChain& datum, uint32_t an1, uint32_t an2,
hzEcodeInteg(hzLogger& log)Performs an integrity check on the binary datum repository. The test expects to find in the index file, the time/date stamp and addresses of datum to be in ascending order. It further expects to find the sizes total exactly matches the data file size.
hzEcodeOpen(void)Open the hdbBinRepos instance. This is a matter of opening an input and an output stream for both index the data files. Note the output streams are opened with ios::app as they will only ever append. Arguments: None
uint32_tSeqId(void)
hzEcodeUpdate(uint32_t& datumId)hzChain& datum, Replace the datum identified by the supplied id (arg1), with the contents of the supplied hzChain (arg2). In all cases this action is a DEPRECATE of the existing datum, and an INSERT of the new.
hzEcodeUpdate(uint32_t& datumId)hzChain& datum, uint32_t an1, uint32_t an2,
hzStringstrName(void)
const char*txtName(void)

Overloaded operators:

hdbBinRepos&operator=(hdbBinRepos&)

Member Variables:

hzStringm_FileDataName of row data file
hzStringm_FileIndxName of index file (addresses and sizes of rows)
hzLockSm_LockDrdLock on data file read
hzLockSm_LockDwrLock on data file write
hzLockSm_LockIrdLock on index file read
hzLockSm_LockIwrLock on index file write
hzStringm_NameName of object store file
ifstreamm_RdDData file input stream for Fetch
ifstreamm_RdIData file input stream for Fetch
hzStringm_WorkdirDirectory where object store file is
ofstreamm_WrDData file output stream for Insert/Update
ofstreamm_WrIIndex file output stream for Insert/Update
uint32_tm_nInitStateInitialization state
uint32_tm_nPopulationPopulation
uint32_tm_nSeqIdHighest datum id thusfar issued
uint64_tm_nSizeSize of data file
hdbADP*m_pADPHost ADP