FUStatus Class Reference
[Utility Classes.]

A return status structure that includes a string. More...

#include <FUStatus.h>

List of all members.

Public Member Functions

 FUStatus (bool _callSuccessful=true)
 Default Constructor.
FUStatusFail ()
 Sets the value of the return code to 'failure'.
FUStatusFail (const fstring &str, size_t line=0)
 Sets the value of the return code to 'failure'.
FUStatusFail (const fchar *str, size_t line=0)
 See above.
FUStatusWarning (const fstring &str, size_t line=0)
 Adds a warning to the return status.
FUStatusWarning (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.


Detailed Description

A return status structure that includes a string.

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.


Constructor & Destructor Documentation

FUStatus::FUStatus bool  _callSuccessful = true  )  [inline]
 

Default Constructor.

The default return code is 'successful'.

Parameters:
_callSuccessful Whether the return code should be set to 'successful'.


Member Function Documentation

void FUStatus::AppendStatus const FUStatus a  )  [inline]
 

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'.

Parameters:
a The return status to merge with.

void FUStatus::AppendString const fstring &  str  )  [inline]
 

Appends a return string to the return status.

A 'newline' code is added between return strings.

Parameters:
str The return string to append.

FUStatus& FUStatus::Fail const fstring &  str,
size_t  line = 0
[inline]
 

Sets the value of the return code to 'failure'.

Parameters:
str The error string for the error encountered.
line A line number.
Returns:
The return status structure. Returns itself to support multiple subsequent operations in one statement.

FUStatus& FUStatus::Fail  )  [inline]
 

Sets the value of the return code to 'failure'.

Returns:
The error code structure. Returns itself to support multiple subsequent operations in one statement.

const fchar* FUStatus::GetErrorString  )  const [inline]
 

Retrieves the error/return string for this return status.

Returns:
The return string.

bool FUStatus::IsFailure  )  const [inline]
 

Retrieves whether the return status is 'failure'.

Returns:
Whether the return status is 'failure'.

bool FUStatus::IsSuccessful  )  const [inline]
 

Retrieves whether the return status is 'successful'.

Returns:
Whether the return status is 'successful'.

FUStatus::operator bool  )  const [inline]
 

Transforms the return status into a boolean primitive.

Returns:
Whether the return status is 'successful'.

FUStatus& FUStatus::Warning const fstring &  str,
size_t  line = 0
[inline]
 

Adds a warning to the return status.

A warning does not set the return code to 'failure'.

Parameters:
str The warning string for the error encountered.
line A line number.
Returns:
The return status structure. Returns itself to support multiple subsequent operations in one statement.


The documentation for this class was generated from the following file:
Generated on Fri May 12 16:44:44 2006 for FCollada by  doxygen 1.4.6-NO