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

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

Function Logic:

0:START 1:hzList::Count 2:!m_Objects.Count() 3:m_pObj hdbObject::Init 4:objKey 5:hdbObject::SetName 6:hzList::Add 7:Return E_OK 8:m_pObj objI 9:objI.Valid(); 10:hzList::Iter::Element pObj_test 11:pObj_test->ObjKey()!=objKey 12:m_pObj 13:!m_pObj 14:m_pObj hdbObject::Init 15:objKey 16:hdbObject::SetName 17:hzList::Add 18:Return E_OK

Function body:

hzEcode hdsInfo::ObjectAssert (const hzString& objKey, const hdbClass* pClass)
{
   hzList<hdbObject*>::Iter    objI ;
   hdbObject*      pObj_test ;
   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 ;
}