Return TypeFunction nameArguments
hzEcodehdbObjRepos::Open(void)

Declared in file: hzDatabase.h
Defined in file : hdbObjRepos.cpp

Function Logic:

0:START 1:!this 2:Fatal 3:_hdb_ck_initstate 4:m_pBR_Datum 5:hdbBinRepos::Open rc 6:rc!=E_OK 7:Return hzerr(E_NOINIT,Could not open mbr datum binary repos) 8:m_pBR_Delta 9:hdbBinRepos::Open rc 10:rc!=E_OK 11:Return hzerr(E_NOINIT,Could not open delta binary repos) 12:hdbObjRepos::_loadCache rc Err2Txt 13:hdbObjRepos::_loadDeltas rc 14:rc==E_OK 15:ofstream::open ofstream::fail 16:m_osDelta.fail() 17:Return hzerr(E_WRITEFAIL,Class %s Cannot open data file %s in write mode,*m_Name,*m_pathCD) 18:m_eReposInit 19:hdbObjRepos::txtName hdbObjRepos::Count Err2Txt 20:Return rc

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 ;
}