Return Type | Function name | Arguments |
---|---|---|
hzEcode | hdbObject::GetObject | (hdbObject&,const hdbMember*,unsigned int,) |
Declared in file: hzDatabase.h
Defined in file : hdbObject.cpp
Function Logic:
Function body:
hzEcode hdbObject::GetObject (hdbObject& sub, const hdbMember* pMbr, unsigned int nOset) { _hzfunc("hdbObject::GetObject") ; hzArray <_obj_data*>* pArr ; _obj_data* pSub ; uchar* pMCS ; uchar* pLitmus ; hzEcode rc ; if (!this) hzexit(E_CORRUPT, "No instance") ; if (!m_pClass) return hzerr(E_NOINIT, "Single object container not init to a data class") ; if (!sub.m_pClass) return hzerr(E_NOINIT, "Subclass object container not init to a data 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_CLASS) return hzerr(E_TYPE, "Member %s is atomic", pMbr->txtName()) ; if (pMbr->Datatype() != sub.m_pClass) return hzerr(E_TYPE, "Member %s is not of type class %s", pMbr->txtName(), sub.m_pClass->txtName()) ; sub.Clear() ; pMCS = m_pRoot->m_Core + pMbr->OsetStd() ; pLitmus = m_pRoot->m_Core + m_pClass->CoreLen() ; if (pLitmus[pMbr->Posn()] & LITMUS_SET) { pArr = (hzArray<_obj_data*>*) pMCS ; if (nOset >&eq; pArr->Count()) return E_NOTFOUND ; pSub = pArr->operator[](nOset) ; sub.m_pRoot = pSub ; sub.m_pRoot->m_copy++ ; } return E_OK ; }