![]() |
VR-Vantage 3.0.3 API Documentation
|
Result of parsing (wraps ParseErrorCode) More...
Public Member Functions | |
| ParseResult () | |
| Default constructor, no error. | |
| ParseResult (ParseErrorCode code, size_t offset) | |
| Constructor to set an error. | |
| ParseErrorCode | Code () const |
| Get the error code. | |
| size_t | Offset () const |
| Get the error offset, if IsError(), 0 otherwise. | |
| operator bool () const | |
Conversion to bool, returns true, iff !IsError(). | |
| bool | IsError () const |
| Whether the result is an error. | |
| bool | operator== (const ParseResult &that) const |
| bool | operator== (ParseErrorCode code) const |
| void | Clear () |
| Reset error code. | |
| void | Set (ParseErrorCode code, size_t offset=0) |
| Update error code and offset. | |
Private Attributes | |
| ParseErrorCode | code_ |
| size_t | offset_ |
Friends | |
| bool | operator== (ParseErrorCode code, const ParseResult &err) |
Result of parsing (wraps ParseErrorCode)
|
inline |
Default constructor, no error.
|
inline |
Constructor to set an error.
|
inline |
Get the error code.
References code_.
Referenced by GenericReader< SourceEncoding, TargetEncoding, StackAllocator >::GetParseErrorCode().
|
inline |
Get the error offset, if IsError(), 0 otherwise.
References offset_.
Referenced by GenericReader< SourceEncoding, TargetEncoding, StackAllocator >::GetErrorOffset().
|
inline |
|
inline |
Whether the result is an error.
References code_, and kParseErrorNone.
Referenced by GenericReader< SourceEncoding, TargetEncoding, StackAllocator >::HasParseError(), and operator bool().
|
inline |
References code_.
|
inline |
References code_.
Reset error code.
References kParseErrorNone, and Set().
Referenced by GenericReader< SourceEncoding, TargetEncoding, StackAllocator >::IterativeParse(), and GenericReader< SourceEncoding, TargetEncoding, StackAllocator >::Parse().
|
inline |
Update error code and offset.
References code_, and offset_.
Referenced by Clear(), and GenericReader< SourceEncoding, TargetEncoding, StackAllocator >::SetParseError().
|
friend |
|
private |
Referenced by Code(), IsError(), operator==(), and Set().