Return pointer to object

Return TypeFunction nameArguments
OBJ*hzArray::InSitu(uint32_t,)

Declared and defined in file: hzTmplArray.h

Function Logic:

0:START 1:unknown 2:Return 0 3:f 4:unknown 5:pDN pObj 6:Return pObj+nPosn 7:pIdx 8:unknown 9:x 10:n x f pIdx 11:pDN pObj 12:Return pObj+(x%f)

Function body:

OBJ* hzArray::InSitu (uint32_t nPosn)
   {
       //  Return pointer to object
       _hzfunc("hzArray::InSitu") ;
       _hz_ar_indx*    pIdx ;  //  Index node pointer
       _hz_ar_data*    pDN ;   //  Index node pointer
       OBJ*            pObj ;  //  Object pointer
       uint32_t    x ;         //  Position reached so far
       uint32_t    n ;         //  Offest at current level
       uint32_t    f ;         //  Division factor
       if (nPosn >&eq; mx->m_nCount)
           return 0;
       f = mx->m_nFactor ;
       if (f == 1)
       {
           pDN = (_hz_ar_data*) mx->m_pRoot ;
           pObj = (OBJ*) pDN->m_Objs ;
           return pObj + nPosn ;
       }
       pIdx = (_hz_ar_indx*) mx->m_pRoot ;
       for (x = nPosn, f = mx->m_nFactor ; f >&eq; (HZ_ARRAY_NODESIZE * HZ_ARRAY_NODESIZE) ;)
       {
           n = x/f ; x %= f ; f /= HZ_ARRAY_NODESIZE ;
           pIdx = (_hz_ar_indx*) pIdx->m_Ptrs[n] ;
       }
       pDN = (_hz_ar_data*) pIdx->m_Ptrs[x/f] ;
       pObj = (OBJ*) pDN->m_Objs ;
       return pObj + (x%f) ;
   }