#include <sgftoken.hpp>
Inheritance diagram for t_str_chunk_reader:

Public Member Functions | |
| t_str_chunk_reader (char *the_buffer, unsigned len) | |
| Constructor. | |
| virtual | ~t_str_chunk_reader () |
| Virtual destructor. | |
Protected Member Functions | |
| virtual bool | get_chunk ()=0 |
| Gets the current chunk. | |
Protected Attributes | |
| char * | buffer |
| unsigned | buf_len |
Friends | |
| bool | read_by_chunks (char, t_str_chunk_reader &) |
| Reads characters from 'sg_input_f' until 'term' is encountered. | |
| t_str_chunk_reader::t_str_chunk_reader | ( | char * | the_buffer, | |
| unsigned | len | |||
| ) | [inline] |
Constructor.
| [in] | the_buffer | The buffer |
| [in] | len | The maximal chunk length (without '\0') |
| virtual t_str_chunk_reader::~t_str_chunk_reader | ( | ) | [inline, virtual] |
Virtual destructor.
| virtual bool t_str_chunk_reader::get_chunk | ( | ) | [protected, pure virtual] |
Gets the current chunk.
| bool read_by_chunks | ( | char | term, | |
| t_str_chunk_reader & | reader | |||
| ) | [friend] |
Reads characters from 'sg_input_f' until 'term' is encountered.
The characters are written to 'reader.buffer'. As soon as the buffer is filled up it is flushed using 'reader.get_chunk'. If this function returns nonzero, the further characters up to 'term' or the end of the file are skipped. Unless EOF encounered the terminating character 'term' is written to input_token_buf, else (if EOF encountered) the first entry of input_token_buf is set to zero. last_delim is always set to zero. The function returns zero if 'reader.get_chunk' has returned zero at all the calls and nonzero otherwise.
char* t_str_chunk_reader::buffer [protected] |
unsigned t_str_chunk_reader::buf_len [protected] |
1.5.2