Class SFCGAL::tools::BasicInputStreamReader
template <typename CharType>
ClassList > SFCGAL > tools > BasicInputStreamReader
#include <InputStreamReader.h>
Public Types
Type | Name |
---|---|
typedef CharType | char_type |
typedef std::basic_istream< char_type > | istream_type |
typedef std::basic_istream< char_type >::pos_type | pos_type |
typedef std::basic_string< char_type > | string_type |
Public Functions
Type | Name |
---|---|
BasicInputStreamReader (istream_type & s, bool skipWhiteSpaces=true) constructor with an input stream |
|
void | begin () save input stream state (read position) |
void | commit () validate read from input stream |
string_type | context (size_t nMax=20) |
bool | eof () const test if read is complete (either tried to reader after eof, either on eof) |
bool | imatch (char_type const & c) try to match a char in the input stream, case-insensitive variant |
bool | imatch (string_type const & str) try to match a string in the input stream, case-insensitive variant |
bool | match (char_type const & c) try to match a char in the input stream |
bool | match (string_type const & str) try to match a string in the input stream |
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 | rollback () restore stream state (read position) |
istream_type & | s () returns the wrapped stream |
istream_type const & | s () const returns the wrapped stream |
Detailed Description
Helper class to parse data from stream.
Public Types Documentation
typedef char_type
typedef CharType SFCGAL::tools::BasicInputStreamReader< CharType >::char_type;
typedef istream_type
typedef std::basic_istream<char_type> SFCGAL::tools::BasicInputStreamReader< CharType >::istream_type;
typedef pos_type
typedef std::basic_istream<char_type>::pos_type SFCGAL::tools::BasicInputStreamReader< CharType >::pos_type;
typedef string_type
typedef std::basic_string<char_type> SFCGAL::tools::BasicInputStreamReader< CharType >::string_type;
Public Functions Documentation
function BasicInputStreamReader [1/2]
inline SFCGAL::tools::BasicInputStreamReader::BasicInputStreamReader (
istream_type & s,
bool skipWhiteSpaces=true
)
function begin
inline void SFCGAL::tools::BasicInputStreamReader::begin ()
function commit
inline void SFCGAL::tools::BasicInputStreamReader::commit ()
function context
inline string_type SFCGAL::tools::BasicInputStreamReader::context (
size_t nMax=20
)
returns a string corresponding to the current state
function eof
inline bool SFCGAL::tools::BasicInputStreamReader::eof () const
function imatch [1/2]
inline bool SFCGAL::tools::BasicInputStreamReader::imatch (
char_type const & c
)
function imatch [2/2]
inline bool SFCGAL::tools::BasicInputStreamReader::imatch (
string_type const & str
)
function match [1/2]
inline bool SFCGAL::tools::BasicInputStreamReader::match (
char_type const & c
)
function match [2/2]
inline bool SFCGAL::tools::BasicInputStreamReader::match (
string_type const & str
)
function read
template<typename T>
inline bool SFCGAL::tools::BasicInputStreamReader::read (
T & value
)
function readBytes
inline auto SFCGAL::tools::BasicInputStreamReader::readBytes (
std::string & buffer,
size_t bytesToRead
)
function rollback
inline void SFCGAL::tools::BasicInputStreamReader::rollback ()
function s [1/2]
inline istream_type & SFCGAL::tools::BasicInputStreamReader::s ()
function s [2/2]
inline istream_type const & SFCGAL::tools::BasicInputStreamReader::s () const
The documentation for this class was generated from the following file /builds/sfcgal/SFCGAL/src/detail/tools/InputStreamReader.h