Set member value within data object. The object must be initialized to a data class, and the supplied member must exist within that class

Return TypeFunction nameArguments
hzEcodehdbObject::SetValue(hdbMember*,hzAtom&,)

Declared in file: hzDatabase.h
Defined in file : hdbObject.cpp

Function Logic:

0:START 1:unknown 2:items 3:unknown 4:Return hzerr(E_NOINIT,Single object container not init to a data class) 5:unknown 6:Return hzerr(E_ARGUMENT,No member supplied) 7:unknown 8:Return hzerr(E_CORRUPT,Member %s does not belong to class %s,pMbr->txtName(),m_pClass->txtName()) 9:unknown 10:Return hzerr(E_BADVALUE,Member %s not set,pMbr->txtName()) 11:unknown 12:m_pRoot 13:Return m_pRoot->SetValue(pMbr,atom)

Function body:

hzEcode hdbObject::SetValue (hdbMember* pMbr)hzAtom& atom, 
{
   //  Set member value within data object. The object must be initialized to a data class, and the supplied member must exist within that class
   //  
   //  Arguments: 1) pMbr The member
   //     2) atom The atomic value the member will be set to
   //  
   //  Returns: E_NOINIT If the object has not been initialized to a class
   //     E_ARGUMENT If no member is supplied
   //     E_CORRUPT If the supplied member number does not identify an object class member.
   //     E_TYPE  If the object class member is not atomic (is another class) or if the supplied atom has the wrong type.
   //     E_OK  If the object class member has been set to the supplied atom value.
   _hzfunc("hdbObject::SetValue") ;
   //  _atomval av ;  // atom data
   //  uchar*  pLitmus ; // Litmus bits
   //  uchar*  pMCS ;  // Pointer to member core space
   //  Object has class?
   if (!this)      hzexit(E_CORRUPT, "No instance") ;
   if (!m_pClass)  return hzerr(E_NOINIT, "Single 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()) ;
   //  Check status
   if (atom.Status() == ATOM_ERROR)
       return hzerr(E_BADVALUE, "Member %s not set", pMbr->txtName()) ;
   if (!m_pRoot)
       m_pRoot = _obj_data::GetInstance(m_pClass) ;
   return m_pRoot->SetValue(pMbr, atom) ;
}