Defined in file: hzChain.h

Standard bytewise chain iterator

Constructors/Detructors

hzChain::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(const char c)Determines if the supplied char (arg 1) is the same as the current char in the chain iterator. - The comparison is case-sensitive. - Returns true/false
boolEqual(const char* s)Determine if the supplied char 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(const char c)
boolEquiv(const 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)
hzChain::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.
charcurrent(void)Return the value of the char 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!=(const char c)
booloperator!=(const char* s)
booloperator!=(hzString& S)
booloperator!=(hzChain::Iter& I)
charoperator*(void)Return the value of the char currently pointed to by the iterator Arguments: None
hzChain::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
hzChain::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++'.
hzChain::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.
hzChain::Iter&operator--(void)Decrements the current chain iterator if it can be incremented (is not at the end of the chain) Arguments: None
hzChain::Iter&operator--(int)Decrements the current chain iterator if it can be incremented (is not at the end of the chain)
hzChain::Iter&operator-=(uint32_t nDec)Retards the current chain iterator by the requested length. Will set the iterator to the start of the chain if the requested decrement is too great.
hzChain::Iter&operator=(hzChain& I)Set this chain iterator to the start of the supplied chain
hzChain::Iter&operator=(hzChain::Iter& I)Set this chain iterator to another chain iterator
booloperator==(const char c)
booloperator==(const char* s)
booloperator==(hzString& S)
booloperator==(hzChain::Iter& I)
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