#include <mootTokenIO.h>
Inheritance diagram for moot::TokenReader:
|
Default constructor \fmt: bitmask of TokenIO::TokenIOFormat flags \mode: default input mode \name: name of current input source |
|
Default destructor : override in descendant classes |
|
Get current byte number. Descendants may override this method. Reimplemented in moot::TokenReaderExpat. |
|
Get current byte number. Descendants may override this method. Reimplemented in moot::TokenReaderExpat. |
|
Complain, giving verbose information |
|
Finish input from currently selected source & perform any required cleanup operations. This method should always be called before selecting a new input source. The current input stream is only closed if it was created locally. Descendants may override this method. Reimplemented in moot::TokenReaderExpat. |
|
Set current column number. Descendants may override this method. Reimplemented in moot::TokenReaderExpat, and moot::TokenReaderNative. |
|
Get current column number. Descendants may override this method. Reimplemented in moot::TokenReaderExpat, and moot::TokenReaderNative. |
|
Select input from a C memory-buffer. Caller is responsible for allocation and de-allocation. Descendants using C memory-buffer input may override this method. Default implementation calls from_mstream(). Reimplemented in moot::TokenReaderExpat. |
|
Select input from a C++ stream. Caller is responsible for allocation and de-allocation. Descendants using C++ stream input may override this method. Default implementation calls from_mstream(). Reimplemented in moot::TokenReaderExpat. |
|
Select input from a file descriptor. Caller is responsible for opening and closing the stream. Descendants using file descriptor input may override this method. No default implementation. Reimplemented in moot::TokenReaderExpat. |
|
Select input from a C stream. Caller is responsible for opening and closing the stream. Descendants using C stream input may override this method. Default implementation calls from_mstream(). Reimplemented in moot::TokenReaderExpat. |
|
Select input from a named file. Descendants using named file input may override this method. The filename "-" may be used to specify stdin. Default implementation calls from_mstream(). Reimplemented in moot::TokenReaderExpat. |
|
Select input from a mootio::mistream object, reference version. Default implementation just calls from_mstream(&mis). Reimplemented in moot::TokenReaderExpat. |
|
Select input from a mootio::mistream pointer. This is the basic case. Descendendant classes may want to override this method. Reimplemented in moot::TokenReaderExpat, and moot::TokenReaderNative. |
|
Select input from a NUL-terminated C string. Caller is responsible for allocation and de-allocation. Descendants using C string input may override this method. Default implementation calls from_cbuffer(s,len). |
|
Read in next sentence. On completion, current sentence (if any) is in *tr_sentence. Descendants may override this method for sentence-wise input. Reimplemented in moot::TokenReaderExpat, and moot::TokenReaderNative. |
|
Get the next token from the buffer. On completion, current token (if any) is in *tr_token. Descendants must override this method. Reimplemented in moot::TokenReaderExpat, and moot::TokenReaderNative. |
|
Set current line number. Descendants may override this method. Reimplemented in moot::TokenReaderExpat, and moot::TokenReaderNative. |
|
Get current line number. Descendants may override this method. Reimplemented in moot::TokenReaderExpat, and moot::TokenReaderNative. |
|
Set reader subtype name to use for diagnostics. Descendants may override this method. Reimplemented in moot::TokenReaderExpat. |
|
Get a pointer to the current input sentence. Returns NULL if no sentence is available.
|
|
Get pointer to the current input token. Returns NULL if no token is available.
|
|
Clear TokenReader-relevant construction buffers, if they exist. |
|
Default size of input buffer. |
|
Format flags: bitmask of TokenIO::TokenIOFormat flags |
|
Currently selected input stream (may be NULL) |
|
Whether we created tr_istream locally |
|
Name of TokenReader subtype. |
|
Pointer to a real internal 'current sentence' buffer, used as return value for sentence() method. Descendant implementations are responsible for allocation, population, maniuplation, and destruction of the data it points to. |
|
Pointer to a real internal 'current token' buffer, used as return value for token() method. Descendant implementations are responsible for allocation, population, manipulation, and destruction of the data it points to. |