itom 1.3.0
|
Class for error value management. More...
#include <retVal.h>
Public Member Functions | |
RetVal (tRetValue retValue) | |
RetVal (int retValue) | |
RetVal (ito::tRetValue retValue, int retCode, const char *pRetMessage) | |
RetVal & | operator= (const RetVal &rhs) |
RetVal & | operator+= (const RetVal &rhs) |
RetVal | operator+ (const RetVal &rhs) |
char | operator== (const RetVal &rhs) |
char | operator!= (const RetVal &rhs) |
char | operator== (const tRetValue rhs) |
char | operator!= (const tRetValue rhs) |
void | appendRetMessage (const char *addRetMessage) |
int | containsWarning () const |
int | containsError () const |
int | containsWarningOrError () const |
bool | hasErrorMessage () const |
int | errorCode () const |
const char * | errorMessage () const |
Static Public Member Functions | |
static RetVal | format (ito::tRetValue retValue, int retCode, const char *pRetMessage,...) |
Private Attributes | |
tRetValue | m_retValue |
int | m_retCode |
ByteArray | m_retMessage |
Class for error value management.
The RetVal class is used for handling return codes. All classes should use this class. In case an error occurs, only the first error is stored and will not be overridden by potentially subsequent occurring errors.
ito::RetVal::RetVal | ( | ito::tRetValue | retValue, |
int | retCode, | ||
const char * | pRetMessage | ||
) |
int ito::RetVal::containsError | ( | ) | const [inline] |
checks if any error has occurred in this return value (true), else (false)
int ito::RetVal::containsWarning | ( | ) | const [inline] |
checks if any warning has occurred in this return value (true), else (false)
int ito::RetVal::containsWarningOrError | ( | ) | const [inline] |
checks if any warning or error has occurred in this return value (true), else (false)
const char* ito::RetVal::errorMessage | ( | ) | const [inline] |
returns zero-terminated error message or empty, zero-terminated string if no error message has been set
char ito::RetVal::operator!= | ( | const RetVal & | rhs | ) | [inline] |
char ito::RetVal::operator!= | ( | const tRetValue | rhs | ) | [inline] |
unequality operator compares retValue with tRetValue constant. For possible constant values see tRetValue
Concatenation of RetVal See operator RetVal::operator+=
Concatenation of RetVal "Adds" RetVals, i.e. returns the most serious error. In case of equally serious errors the first is retained
assignment operator, copies values of rhs to current RetVal. Before copiing current errorMessage is freed
char ito::RetVal::operator== | ( | const RetVal & | rhs | ) | [inline] |
char ito::RetVal::operator== | ( | const tRetValue | rhs | ) | [inline] |
equality operator compares retValue with tRetValue constant. For possible constant values see tRetValue
int ito::RetVal::m_retCode [private] |
the error code itself
tRetValue ito::RetVal::m_retValue [private] |
can be one of enumeration tLogLevel values or an or-combination of these values