PUMA Library Reference Manual
Puma::ErrorSeverity Class Reference

#include <Puma/ErrorSeverity.h>

Description

Severity of errors represented by a short integer and a textual representation. Following error severities are defined (in ascending order):

Public Member Functions

 ErrorSeverity (unsigned short severity=0, const char *text=(const char *) 0)
 Constructor. More...
 
 ErrorSeverity (const ErrorSeverity &copy)
 Copy-constructor. More...
 
ErrorSeverityoperator= (const ErrorSeverity &severity)
 Assign another severity. More...
 
int operator< (const ErrorSeverity &other) const
 Check if this severity is lower than the given. More...
 
int operator> (const ErrorSeverity &other) const
 Check if this severity is higher than the given. More...
 
int operator<= (const ErrorSeverity &other) const
 Check if this severity is lower than or the same as the given. More...
 
int operator>= (const ErrorSeverity &other) const
 Check if this severity is higher than or the same as the given. More...
 
int operator== (const ErrorSeverity &other) const
 Check if this severity is the same as the given. More...
 
int operator!= (const ErrorSeverity &other) const
 Check if this severity is not the same as the given. More...
 
const char * text () const
 Get the textual representation of this severity. More...
 

Constructor & Destructor Documentation

◆ ErrorSeverity() [1/2]

Puma::ErrorSeverity::ErrorSeverity ( unsigned short  severity = 0,
const char *  text = (const char*) 0 
)
inline

Constructor.

Parameters
severityThe severity value.
textThe textual representation.

◆ ErrorSeverity() [2/2]

Puma::ErrorSeverity::ErrorSeverity ( const ErrorSeverity copy)
inline

Copy-constructor.

Parameters
copyThe error severity to copy.

Member Function Documentation

◆ operator!=()

int Puma::ErrorSeverity::operator!= ( const ErrorSeverity other) const
inline

Check if this severity is not the same as the given.

Parameters
otherThe severity to compare with.
Returns
1 if true, 0 otherwise.

◆ operator<()

int Puma::ErrorSeverity::operator< ( const ErrorSeverity other) const
inline

Check if this severity is lower than the given.

Parameters
otherThe severity to compare with.
Returns
1 if true, 0 otherwise.

◆ operator<=()

int Puma::ErrorSeverity::operator<= ( const ErrorSeverity other) const
inline

Check if this severity is lower than or the same as the given.

Parameters
otherThe severity to compare with.
Returns
1 if true, 0 otherwise.

◆ operator=()

ErrorSeverity& Puma::ErrorSeverity::operator= ( const ErrorSeverity severity)
inline

Assign another severity.

Parameters
severityThe severity to assign.
Returns
A reference to this.

◆ operator==()

int Puma::ErrorSeverity::operator== ( const ErrorSeverity other) const
inline

Check if this severity is the same as the given.

Parameters
otherThe severity to compare with.
Returns
1 if true, 0 otherwise.

◆ operator>()

int Puma::ErrorSeverity::operator> ( const ErrorSeverity other) const
inline

Check if this severity is higher than the given.

Parameters
otherThe severity to compare with.
Returns
1 if true, 0 otherwise.

◆ operator>=()

int Puma::ErrorSeverity::operator>= ( const ErrorSeverity other) const
inline

Check if this severity is higher than or the same as the given.

Parameters
otherThe severity to compare with.
Returns
1 if true, 0 otherwise.

◆ text()

const char* Puma::ErrorSeverity::text ( ) const
inline

Get the textual representation of this severity.

Returns
The textual representation.