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-TYPE | hdbBinRepos | (hdbADP& adp) | |
| void | ~hdbBinRepos | (void) | |
| NULL-TYPE | ~hdbBinRepos | (void) |
Public Methods:
| hzEcode | Close | (void) | Close the Binary Repository. Arguments: None |
| uint32_t | Count | (void) | |
| hzEcode | Delete | (uint32_t datumId) | Delete an object from the datacron. This function appears only for consistency with the base class and does nothing. |
| hzEcode | Fetch | (hzChain& datum)uint32_t datumId, | Purpose: Fetches a single row of data into the supplied object. |
| bool | IState | (void) | |
| hzEcode | Init | (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. |
| hzEcode | Insert | (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 |
| hzEcode | Insert | (uint32_t& datumId)hzChain& datum, uint32_t an1, uint32_t an2, | |
| hzEcode | Integ | (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. |
| hzEcode | Open | (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_t | SeqId | (void) | |
| hzEcode | Update | (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. |
| hzEcode | Update | (uint32_t& datumId)hzChain& datum, uint32_t an1, uint32_t an2, | |
| hzString | strName | (void) | |
| const char* | txtName | (void) |
Overloaded operators:
| hdbBinRepos& | operator= | (hdbBinRepos&) |
Member Variables:
| hzString | m_FileData | Name of row data file | |
| hzString | m_FileIndx | Name of index file (addresses and sizes of rows) | |
| hzLockS | m_LockDrd | Lock on data file read | |
| hzLockS | m_LockDwr | Lock on data file write | |
| hzLockS | m_LockIrd | Lock on index file read | |
| hzLockS | m_LockIwr | Lock on index file write | |
| hzString | m_Name | Name of object store file | |
| ifstream | m_RdD | Data file input stream for Fetch | |
| ifstream | m_RdI | Data file input stream for Fetch | |
| hzString | m_Workdir | Directory where object store file is | |
| ofstream | m_WrD | Data file output stream for Insert/Update | |
| ofstream | m_WrI | Index file output stream for Insert/Update | |
| uint32_t | m_nInitState | Initialization state | |
| uint32_t | m_nPopulation | Population | |
| uint32_t | m_nSeqId | Highest datum id thusfar issued | |
| uint64_t | m_nSize | Size of data file | |
| hdbADP* | m_pADP | Host ADP |