NDDEM
|
Result of parsing (wraps ParseErrorCode) More...
#include <error.h>
Public Types | |
typedef bool(ParseResult::* | BooleanType) () const |
! Unspecified boolean type More... | |
Public Member Functions | |
ParseResult () | |
Default constructor, no error. More... | |
ParseResult (ParseErrorCode code, size_t offset) | |
Constructor to set an error. More... | |
ParseErrorCode | Code () const |
Get the error code. More... | |
size_t | Offset () const |
Get the error offset, if IsError(), 0 otherwise. More... | |
operator BooleanType () const | |
Explicit conversion to bool , returns true , iff !IsError(). More... | |
bool | IsError () const |
Whether the result is an error. More... | |
bool | operator== (const ParseResult &that) const |
bool | operator== (ParseErrorCode code) const |
bool | operator!= (const ParseResult &that) const |
bool | operator!= (ParseErrorCode code) const |
void | Clear () |
Reset error code. More... | |
void | Set (ParseErrorCode code, size_t offset=0) |
Update error code and offset. More... | |
Private Attributes | |
ParseErrorCode | code_ |
size_t | offset_ |
Friends | |
bool | operator== (ParseErrorCode code, const ParseResult &err) |
bool | operator!= (ParseErrorCode code, const ParseResult &err) |
Result of parsing (wraps ParseErrorCode)
typedef bool(ParseResult::* ParseResult::BooleanType) () const |
! Unspecified boolean type
|
inline |
Default constructor, no error.
|
inline |
Constructor to set an error.
|
inline |
Reset error code.
|
inline |
Get the error code.
|
inline |
Whether the result is an error.
|
inline |
Get the error offset, if IsError(), 0 otherwise.
|
inline |
Explicit conversion to bool
, returns true
, iff !IsError().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Update error code and offset.
|
friend |
|
friend |
|
private |
|
private |