#include <FUStatus.h>
Public Member Functions | |
FUStatus (bool _callSuccessful=true) | |
Default Constructor. | |
FUStatus & | Fail () |
Sets the value of the return code to 'failure'. | |
FUStatus & | Fail (const fstring &str, size_t line=0) |
Sets the value of the return code to 'failure'. | |
FUStatus & | Fail (const fchar *str, size_t line=0) |
See above. | |
FUStatus & | Warning (const fstring &str, size_t line=0) |
Adds a warning to the return status. | |
FUStatus & | Warning (const fchar *str, size_t line=0) |
See above. | |
void | AppendStatus (const FUStatus &a) |
Merges two return stati together. | |
void | AppendString (const fstring &str) |
Appends a return string to the return status. | |
void | AppendString (const fchar *str) |
See above. | |
const fchar * | GetErrorString () const |
Retrieves the error/return string for this return status. | |
bool | IsSuccessful () const |
Retrieves whether the return status is 'successful'. | |
bool | IsFailure () const |
Retrieves whether the return status is 'failure'. | |
operator bool () const | |
Transforms the return status into a boolean primitive. |
Contains a return code as well as a string which explains the errors and warnings attached to the return code. The return code is either 'successful' or 'failure'. If the return code is 'failure', proceeding normally may be dangerous. This structure is used by the FCDocument classes to explain parsing errors.
|
Default Constructor. The default return code is 'successful'.
|
|
Merges two return stati together. Appends to this return status the error string from the given status. The merged return code is 'failure', if either return codes are 'failure'.
|
|
Appends a return string to the return status. A 'newline' code is added between return strings.
|
|
Sets the value of the return code to 'failure'.
|
|
Sets the value of the return code to 'failure'.
|
|
Retrieves the error/return string for this return status.
|
|
Retrieves whether the return status is 'failure'.
|
|
Retrieves whether the return status is 'successful'.
|
|
Transforms the return status into a boolean primitive.
|
|
Adds a warning to the return status. A warning does not set the return code to 'failure'.
|