|
SFCGAL 2.0.0
|
Helper class to parse data from stream. More...
#include <InputStreamReader.h>
Public Types | |
| typedef CharType | char_type |
| typedef std::basic_string< char_type > | string_type |
| typedef std::basic_istream< char_type > | istream_type |
| typedef std::basic_istream< char_type >::pos_type | pos_type |
Public Member Functions | |
| BasicInputStreamReader (istream_type &s, bool skipWhiteSpaces=true) | |
| constructor with an input stream | |
| bool | match (char_type const &c) |
| try to match a char in the input stream | |
| bool | imatch (char_type const &c) |
| try to match a char in the input stream, case-insensitive variant | |
| bool | match (string_type const &str) |
| try to match a string in the input stream | |
| bool | imatch (string_type const &str) |
| try to match a string in the input stream, case-insensitive variant | |
| template<typename T > | |
| bool | read (T &value) |
| try to read a value in the input stream, restore state if read fails | |
| auto | readBytes (std::string &buffer, size_t bytesToRead) -> void |
| void | begin () |
| save input stream state (read position) | |
| void | commit () |
| validate read from input stream | |
| void | rollback () |
| restore stream state (read position) | |
| bool | eof () const |
| test if read is complete (either tried to reader after eof, either on eof) | |
| istream_type & | s () |
| returns the wrapped stream | |
| istream_type const & | s () const |
| returns the wrapped stream | |
| string_type | context (size_t nMax=20) |
| returns a string corresponding to the current state | |
Helper class to parse data from stream.
| CharType SFCGAL::tools::BasicInputStreamReader< CharType >::char_type |
| std::basic_istream<char_type> SFCGAL::tools::BasicInputStreamReader< CharType >::istream_type |
| std::basic_istream<char_type>::pos_type SFCGAL::tools::BasicInputStreamReader< CharType >::pos_type |
| std::basic_string<char_type> SFCGAL::tools::BasicInputStreamReader< CharType >::string_type |
|
inline |
constructor with an input stream
|
inline |
save input stream state (read position)
|
inline |
validate read from input stream
|
inline |
returns a string corresponding to the current state
|
inline |
test if read is complete (either tried to reader after eof, either on eof)
|
inline |
try to match a char in the input stream, case-insensitive variant
|
inline |
try to match a string in the input stream, case-insensitive variant
|
inline |
try to match a char in the input stream
|
inline |
try to match a string in the input stream
|
inline |
try to read a value in the input stream, restore state if read fails
|
inline |
|
inline |
restore stream state (read position)
|
inline |
returns the wrapped stream
|
inline |
returns the wrapped stream