Defined in file: hzXbuf.h
Standard bytewise chain iterator
Constructors/Detructors
| hzXbuf::Iter* | Iter | (void) | Construct and init the chain iterator |
| Default constructor | Iter() | Not specified in code. Default applies |
Public Methods:
| uint32_t | Advance | (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_t | Col | (void) | |
| bool | Equal | (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 |
| bool | Equal | (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. |
| bool | Equal | (hzString& S) | |
| bool | Equiv | (unsigned char c) | |
| bool | Equiv | (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. |
| bool | Equiv | (hzString& S) | |
| uint32_t | Line | (void) | |
| void | Line | (uint32_t n) | |
| hzEcode | ReadUnicodeChar | (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_t | Write | (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 char | current | (void) | Return the value of the uchar currently pointed to by the iterator Arguments: None |
| bool | eof | (void) | Rteurns true if the iterator is at EOF. Returns false otherwise. Arguments: None |
Overloaded operators:
| bool | operator!= | (unsigned char c) | |
| bool | operator!= | (unsigned char* s) | |
| bool | operator!= | (hzString& S) | |
| bool | operator!= | (hzXbuf::Iter& I) | |
| unsigned char | operator* | (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 char | operator= | (unsigned char c) | Return the value of the char currently pointed to by the iterator Arguments: None |
| bool | operator== | (unsigned char c) | |
| bool | operator== | (unsigned char* s) | |
| bool | operator== | (hzString& S) | |
| bool | operator== | (hzXbuf::Iter& I) | |
| unsigned char | operator[] | (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:
| char | m_Reserved | Not used at present | |
| void* | m_block | Current block address | |
| char | m_cDefault | Default char | |
| uint32_t | m_nCol | Column number | |
| uint32_t | m_nLine | For tracking line numbers | |
| uint16_t | m_nOset | Current offset within block |