Increments the current chain iterator by the requested length. Will set the iterator to the end of the chain if the requested increment is too great.
| Return Type | Function name | Arguments |
|---|---|---|
| hzXbuf::Iter& | hzXbuf::Iter::operator+= | (uint32_t,) |
Declared in file: hzXbuf.h
Defined in file : hzXbuf.cpp
Function Logic:
Function body:
hzXbuf::Iter& hzXbuf::Iter::operator+= (uint32_t nInc)
{
// Increments the current chain iterator by the requested length. Will set the iterator to the end of the chain if the requested increment is too great.
//
// Arguments: 1) nInc The number of bytes to increment the chain iterator by
//
// Returns: Reference to this chain iterator
_hzfunc("hzXbuf::Iter::operator+=") ;
_xblk* zp ; // Chain block pointer
zp = (_xblk*) m_block ;
for (; zp && nInc > 0;)
{
if (zp->m_Data[m_nOset] == CHAR_NL)
{ m_nCol = 0; m_nLine++ ; }
if (zp->m_Data[m_nOset] == CHAR_TAB)
m_nCol += (4-(m_nCol%4));
else
m_nCol++ ;
if (m_nOset < zp->xize)
m_nOset++ ;
if (m_nOset >&eq; zp->xize)
{
if (zp->Next())
{
m_nOset = 0;
m_block = zp = zp->Next() ;
}
}
nInc-- ;
}
return *this ;
}