| Return Type | Function name | Arguments |
|---|---|---|
| hzEcode | hdbObjRepos::Open | (void) |
Declared in file: hzDatabase.h
Defined in file : hdbObjRepos.cpp
Function Logic:
Function body:
hzEcode hdbObjRepos::Open (void)
{
_hzfunc("hdbObjRepos::Open") ;
hzEcode rc ;
if (!this)
Fatal("No instance") ;
_hdb_ck_initstate(m_Name, m_eReposInit, HDB_REPOS_INIT_DONE) ;
if (m_pBR_Datum)
{
rc = m_pBR_Datum->Open() ;
if (rc != E_OK)
return hzerr(E_NOINIT, "Could not open mbr datum binary repos") ;
}
if (m_pBR_Delta)
{
rc = m_pBR_Delta->Open() ;
if (rc != E_OK)
return hzerr(E_NOINIT, "Could not open delta binary repos") ;
rc = _loadCache() ;
threadLog("Whole Object Deltas loaded - Status %s\n", Err2Txt(rc)) ;
}
rc = _loadDeltas() ;
threadLog("Deltas loaded\n") ;
if (rc == E_OK)
{
m_osDelta.open(*m_pathCD, ios::app) ;
if (m_osDelta.fail())
return hzerr(E_WRITEFAIL, "Class %s Cannot open data file %s in write mode", *m_Name, *m_pathCD) ;
m_eReposInit = HDB_REPOS_OPEN ;
}
threadLog("Population of objects in repos %s is %d. Delta file %s. Status %s\n", txtName(), Count(), *m_pathCD, Err2Txt(rc)) ;
return rc ;
}