Set the supplied string with the value of the supplied member
| Return Type | Function name | Arguments |
|---|---|---|
| hzEcode | hdbObject::GetMbrValue | (hzMD5&,hdbMember*,) |
Declared in file: hzDatabase.h
Defined in file : hdbObject.cpp
Function Logic:
Function body:
hzEcode hdbObject::GetMbrValue (hzMD5& md5)hdbMember* pMbr,
{
// Set the supplied string with the value of the supplied member
//
// Arguments: 1) str The string to be set
// 2) pMbr Pointer to the data class member
//
// Returns: E_NOINIT If the object has not been initialized to a class
// E_CORRUPT If the supplied member number does not identify an object class member.
// E_TYPE If the object class member is not a string or a string-like data type.
// E_OK If the object class member has been set to the supplied atom value.
_hzfunc("hdbObject::GetMbrValue(md5)") ;
// _atomval av ; // Member value
hzMD5* pMd5 ; // MD5 pointer
// Clear value and check object set-up
md5.Clear() ;
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_DIGEST)
return hzerr(E_TYPE, "Member %s is not an MD5 digest", pMbr->txtName()) ;
if (!m_pRoot)
return E_OK ;
// Fetch the value from the member space.
pMd5 = (hzMD5*) (m_pRoot->m_Core + pMbr->OsetStd()) ;
md5 = *pMd5 ;
return E_OK ;
}