Defined in file: hzXbuf.h

Standard bytewise chain iterator

Constructors/Detructors

hzXbuf::Iter*Iter(void)Construct and init the chain iterator
Default constructorIter()Not specified in code. Default applies

Public Methods:

uint32_tAdvance(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.
uint32_tCol(void)
boolEqual(unsigned char c)Determines if the supplied uchar (arg 1) is the same as the current uchar in the chain iterator. - The comparison is case-sensitive. - Returns true/false
boolEqual(unsigned char* s)Determine if the supplied uchar sequence (arg 1) matches that at the current point in the chain iterator, return true if it does, false otherwise. The comparison is case-sensitive and the function does not alter (advance or retard) the iterator.
boolEqual(hzString& S)
boolEquiv(unsigned char c)
boolEquiv(unsigned char* s)Determines if the supplied char sequence (arg 1) is found at the current char in the chain iterator. Note this function does not advance the iterator. The comparison is case-insensitive.
boolEquiv(hzString& S)
uint32_tLine(void)
voidLine(uint32_t n)
hzEcodeReadUnicodeChar(uint32_t& uniVal)
hzXbuf::Iter&Skipwhite(void)Advance interator to next non-whitespace char. Unless the iterator is currently pointing at a whitespace char, it does nothing. Arguments: None
uint32_tWrite(void* pBuf)uint32_t maxBytes, Write out to the supplied buffer, from the current position, upto maxBytes. Do not increment the iterator.
uint32_t_oset(void)
unsigned charcurrent(void)Return the value of the uchar currently pointed to by the iterator Arguments: None
booleof(void)Rteurns true if the iterator is at EOF. Returns false otherwise. Arguments: None

Overloaded operators:

booloperator!=(unsigned char c)
booloperator!=(unsigned char* s)
booloperator!=(hzString& S)
booloperator!=(hzXbuf::Iter& I)
unsigned charoperator*(void)Return the value of the uchar currently pointed to by the iterator Arguments: None
hzXbuf::Iter&operator++(void)Increments the current chain iterator if it can be incremented ie is not at the end of the chain. Note that the void argument means this is the 'post evaluation version' called when the code is 'iter++' rather than '++iter'. Arguments: None
hzXbuf::Iter&operator++(int)Increments the current chain iterator if it can be incremented ie is not at the end of the chain. Note that the void argument means this is the 'pre evaluation version' called when the code is '++iter' rather than '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.
hzXbuf::Iter&operator=(hzXbuf& I)Set this chain iterator to the start of the supplied chain
hzXbuf::Iter&operator=(hzXbuf::Iter& I)Set this chain iterator to another
unsigned charoperator=(unsigned char c)Return the value of the char currently pointed to by the iterator Arguments: None
booloperator==(unsigned char c)
booloperator==(unsigned char* s)
booloperator==(hzString& S)
booloperator==(hzXbuf::Iter& I)
unsigned charoperator[](uint32_t nOset)Returns the value of the character pointed to by the iterator plus the supplied offset. The offsets should preferably be small for reasons of efficiency as the method winds through the requested number of places each time. The envisiaged use is in tokenization or encoding where the percent sign followed by a percent sign is a percent but a percent sign followed by two hexidecimal characters is an 8-bit ASCII character. It is a convient means of a look ahead only.

Member Variables:

charm_ReservedNot used at present
void*m_blockCurrent block address
charm_cDefaultDefault char
uint32_tm_nColColumn number
uint32_tm_nLineFor tracking line numbers
uint16_tm_nOsetCurrent offset within block