Set value of the supplied member in the object, with the supplied string
| Return Type | Function name | Arguments |
|---|---|---|
| hzEcode | hdbObject::SetMbrValue | (hdbMember*,hzMD5&,) |
Declared in file: hzDatabase.h
Defined in file : hdbObject.cpp
Function Logic:
Function body:
hzEcode hdbObject::SetMbrValue (hdbMember* pMbr)hzMD5& md5,
{
// Set value of the supplied member in the object, with the supplied string
//
// Arguments: 1) pMbr Pointer to the member to be set
// 2) str The string value
//
// 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::SetMbrValue(str)") ;
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 MD5 Digest", pMbr->txtName()) ;
if (!m_pRoot)
m_pRoot = _obj_data::GetInstance(m_pClass) ;
return m_pRoot->_setMbrValue(pMbr, md5) ;
}