| Return Type | Function name | Arguments |
|---|---|---|
| OBJ* | hzArray::InSitu | (unsigned int,) |
Declared and defined in file: hzTmplArray.h
Function Logic:
Function body:
OBJ* hzArray::InSitu (unsigned int nPosn)
{
_hzfunc("hzArray::InSitu") ;
_hz_ar_indx* pIdx ;
_hz_ar_data* pDN ;
OBJ* pObj ;
uint32_t x ;
uint32_t n ;
uint32_t f ;
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) ;
}