Orcus
|
Protected Types | |
using | numeric_parser_type = std::function< double(const char *&, size_t)> |
Protected Member Functions | |
parser_base (const char *p, size_t n, bool transient_stream) | |
void | set_numeric_parser (const numeric_parser_type &func) |
bool | transient_stream () const |
bool | has_char () const |
bool | has_next () const |
void | next (size_t inc=1) |
void | prev (size_t dec=1) |
char | cur_char () const |
char | next_char () const |
void | skip (const char *chars_to_skip, size_t n_chars_to_skip) |
void | skip_space_and_control () |
bool | parse_expected (const char *expected, size_t n_expected) |
double | parse_double () |
size_t | remaining_size () const |
size_t | available_size () const |
std::ptrdiff_t | offset () const |
Protected Attributes | |
const char *const | mp_begin |
const char * | mp_char |
const char * | mp_end |
const bool | m_transient_stream |
|
inlineprotected |
Determine the number of characters available from the current character to the end of the buffer. The current character is included.
|
protected |
Return the current offset from the beginning of the character stream.
|
protected |
Try to parse the next characters as double, or return NaN in case of failure.
|
protected |
Parse and check next characters to see if it matches specified character sequence.
expected | sequence of characters to match against. |
n_expected | length of the character sequence. |
|
protected |
Determine the number of characters remaining after the current character. For instance, if the current character is on the last character in the stream, this method will return 0, whereas if it's on the first character, it will return the total length - 1.
|
protected |
Skip all characters that are 0-32 in ASCII range