Return Type | Function name | Arguments |
---|---|---|
hzEcode | hdbObject::GetBinary | (hzChain&,const hdbMember*,) |
Declared in file: hzDatabase.h
Defined in file : hdbObject.cpp
Function Logic:
Function body:
hzEcode hdbObject::GetBinary (hzChain& Z, const hdbMember* pMbr) { _hzfunc("hdbObject::GetBinary") ; hzChain* pCh ; uint32_t* pId ; hzEcode rc = E_OK ; if (!m_pClass) return hzerr(E_NOINIT, "Object has no class") ; if (!pMbr) return hzerr(E_ARGUMENT, "No member supplied") ; if (pMbr->Class() != m_pClass) return hzerr(E_CORRUPT, "Member %s does not belong to class %s", pMbr->txtName(), m_pClass->txtName()) ; if (pMbr->Basetype() != BASETYPE_BINARY && pMbr->Basetype() != BASETYPE_TXTDOC) return E_TYPE ; Z.Clear() ; if (!m_pRepos) return hzerr(E_NOINIT, "No repository") ; if (!m_pRepos->BinRepos()) return hzerr(E_NOINIT, "Associated repository has no binary datum repository") ; if (!m_pRoot) return E_OK ; pCh = (hzChain*) (m_pRoot->m_Core + pMbr->OsetAux()) ; if (pCh->Size()) { Z = *pCh ; return E_OK ; } pId = (uint32_t*) (m_pRoot->m_Core + pMbr->OsetStd()) ; if (*pId) { rc = m_pRepos->BinRepos()->Fetch(Z, *pId) ; } return rc ; }