Overwrite the object found at the supplied address, with the supplied object and update any affected indexes accordingly DEPRECATED
| Return Type | Function name | Arguments |
|---|---|---|
| hzEcode | hdbObjRepos::Update | (hdbObject&,uint32_t,) |
Declared in file: hzDatabase.h
Defined in file : hdbObjRepos.cpp
Function Logic:
Function body:
hzEcode hdbObjRepos::Update (hdbObject& obj)uint32_t objId,
{
// Overwrite the object found at the supplied address, with the supplied object and update any affected indexes accordingly
//
// Arguments: 1) obj The new version of the data object
// 2) objId The object id of the original version
//
// DEPRECATED
_hzfunc("hdbObjRepos::Update") ;
const hdbMember* pMbr ; // Data member
hzAtom atom ; // For setting member values
uint32_t mbrNo ; // Member iterator
_hdb_ck_initstate(m_Name, m_eReposInit, HDB_REPOS_OPEN) ;
if (objId >&eq; m_Cache.Count())
return E_RANGE ;
// Now go thru object's class members filling in the allocated fixed length space
for (mbrNo = 0; mbrNo < m_pClass->MbrCount() ; mbrNo++)
{
pMbr = m_pClass->GetMember(mbrNo) ;
obj.GetValue(atom, pMbr, 0);
m_pADP->DeltaOriginateMbr(this, pMbr, atom, DELTA_ORIG_MBRVAL_EQ) ;
}
return E_OK ;
}