Assert (create if not found), the required hdbObject

Return TypeFunction nameArguments
hzEcodehdsInfo::ObjectAssert(hzString&,hdbClass*,)

Declared in file: hzDissemino.h
Defined in file : hdsCore.cpp

Function Logic:

0:START 1:unknown 2:m_pObj items 3:unknown 4:items 5:items 6:Return E_OK 7:m_pObj 8:unknown 9:pObj_test 10:unknown 11:m_pObj 12:unknown 13:m_pObj items 14:unknown 15:items 16:items 17:Return E_OK

Function body:

hzEcode hdsInfo::ObjectAssert (hzString& objKey)hdbClass* pClass, 
{
   //  Category: Dissemino Operation
   //  
   //  Assert (create if not found), the required hdbObject
   //  
   //  Arguments: 1) objKey  The application name for the hdbObject instance
   //     2) classname The object host class
   //  
   //  Returns: E_CORRUPT If the class does not exist or the objKey exists but for a different class
   //     E_OK  If the user session either has or can add the object
   hzList<hdbObject*>::Iter    objI ;  //  Object iterator
   //  const hdbClass* pClass ;  // Host class of object
   hdbObject*      pObj_test ;     //  Test object pointer
   if (!m_Objects.Count())
   {
       m_pObj = new hdbObject() ;
       m_pObj->Init(pClass) ;
       if (objKey)
           m_pObj->SetName(objKey) ;
       m_Objects.Add(m_pObj) ;
       return E_OK ;
   }
   m_pObj = 0;
   for (objI = m_Objects ; objI.Valid() ; objI++)
   {
       pObj_test = objI.Element() ;
       if (pObj_test->ObjKey() != objKey)
           continue ;
       m_pObj = pObj_test ;
       break ;
   }
   if (!m_pObj)
   {
       m_pObj = new hdbObject() ;
       m_pObj->Init(pClass) ;
       if (objKey)
           m_pObj->SetName(objKey) ;
       m_Objects.Add(m_pObj) ;
   }
   return E_OK ;
}