#include <StreamTokenizer.h>
Public Member Functions | |
| StreamTokenizer (istream &is, const string delim=" \t") | |
| The constructor. | |
| string | next_token () |
| Get the next token. | |
| bool | has_token () |
| Ask if the stream has other tokens. | |
Private Types | |
|
typedef istream_iterator< char > | sIt |
| A stream iterator typedef. | |
Private Member Functions | |
| bool | is_delimiter (char c) |
| Checks if the given char is a delimiter. | |
Private Attributes | |
| sIt | p |
| The current position in the stream. | |
| sIt | end_of_stream |
| The end of the stream. | |
| const string | delimiters |
| The delimiters. | |
It takes a stream, and defined the delimiters, it returns the tokens between these delimiters.
Definition at line 44 of file StreamTokenizer.h.
|
||||||||||||
|
The constructor. It defines the delimiters, and use the normal white-spaces on the stream.
Definition at line 57 of file StreamTokenizer.h. |
|
|
Ask if the stream has other tokens.
Definition at line 107 of file StreamTokenizer.h. References StreamTokenizer::end_of_stream, and StreamTokenizer::p. Referenced by UnSerialization::seekAndParseEnclosedValue(), UnSerialization::seekAndParseVectorTag(), and UnSerialization::seekSimpleTag(). |
|
|
Checks if the given char is a delimiter.
Definition at line 123 of file StreamTokenizer.h. References StreamTokenizer::delimiters. Referenced by StreamTokenizer::next_token(). |
|
|
Get the next token.
Definition at line 66 of file StreamTokenizer.h. References StreamTokenizer::end_of_stream, StreamTokenizer::is_delimiter(), and StreamTokenizer::p. Referenced by UnSerialization::seekAndParseEnclosedValue(), UnSerialization::seekAndParseParamTag(), UnSerialization::seekAndParseVectorTag(), and UnSerialization::seekSimpleTag(). |
1.4.5