PUMA Library Reference Manual
|
#include <Puma/ErrorCollector.h>
Error stream implementation that collects all messages in an internal message stack.
Messages are finished with the Puma::endMessage stream manipulator. Collected messages can be shifted to another ErrorSink.
Public Member Functions | |
ErrorCollector () | |
Constructor. | |
virtual | ~ErrorCollector () |
Destructor. | |
ErrorCollector & | operator<< (const char *str) |
Add given string to current error message. | |
ErrorCollector & | operator<< (long value) |
Add given long integer value to current error message. | |
ErrorCollector & | operator<< (unsigned value) |
Add given unsigned integer value to current error message. | |
ErrorCollector & | operator<< (int value) |
Add given signed integer value to current error message. | |
ErrorCollector & | operator<< (short value) |
Add given short integer value to current error message. | |
ErrorCollector & | operator<< (char c) |
Add given character to current error message. | |
ErrorCollector & | operator<< (double value) |
Add given floating point value to current error message. | |
ErrorCollector & | operator<< (const ErrorSeverity &severity) |
Change the severity of the current error message. | |
ErrorCollector & | operator<< (Location location) |
Set the location the error occurred. | |
ErrorCollector & | operator<< (const Printable &obj) |
Add the serialized value of the given object to the current error message. | |
ErrorCollector & | operator<< (void(*fct)(ErrorSink &)) |
Apply the given stream manipulator. | |
void | endMessage () |
Finish the current error message. | |
int | index () |
Get the index of the current error message on the message stack. | |
void | index (int idx) |
Set the index of the current error message on the message stack. | |
void | shift (ErrorSink &dest) |
Shift all collected messages to the destination error sink. | |
const ErrorSeverity & | severity () const |
Get the current error severity of the stream. | |
Public Member Functions inherited from Puma::ErrorSink | |
virtual | ~ErrorSink () |
Destructor. | |
|
inline |
Constructor.
|
inlinevirtual |
Destructor.
|
virtual |
Finish the current error message.
Implements Puma::ErrorSink.
int Puma::ErrorCollector::index | ( | ) |
Get the index of the current error message on the message stack.
void Puma::ErrorCollector::index | ( | int | idx | ) |
Set the index of the current error message on the message stack.
If the new index is less than the current number of messages on the stack, all messages with an index greater than the given index are dropped. If the new index is 0 then all previously collected messages are dropped.
idx | The new index. |
|
virtual |
Add given character to current error message.
c | The character to add. |
Implements Puma::ErrorSink.
|
virtual |
Add given string to current error message.
str | The string to add. |
Implements Puma::ErrorSink.
|
virtual |
Change the severity of the current error message.
severity | The new severity. |
Implements Puma::ErrorSink.
|
virtual |
Add the serialized value of the given object to the current error message.
obj | The object to serialize. |
Implements Puma::ErrorSink.
|
virtual |
Add given floating point value to current error message.
value | The value to add. |
Implements Puma::ErrorSink.
|
virtual |
Add given signed integer value to current error message.
value | The value to add. |
Implements Puma::ErrorSink.
|
virtual |
Set the location the error occurred.
location | The error location. |
Implements Puma::ErrorSink.
|
virtual |
Add given long integer value to current error message.
value | The value to add. |
Implements Puma::ErrorSink.
|
virtual |
Add given short integer value to current error message.
value | The value to add. |
Implements Puma::ErrorSink.
|
virtual |
Add given unsigned integer value to current error message.
value | The value to add. |
Implements Puma::ErrorSink.
|
virtual |
Apply the given stream manipulator.
fct | The stream manipulator function. |
Implements Puma::ErrorSink.
const ErrorSeverity & Puma::ErrorCollector::severity | ( | ) | const |
Get the current error severity of the stream.
void Puma::ErrorCollector::shift | ( | ErrorSink & | dest | ) |
Shift all collected messages to the destination error sink.
dest | The destination error sink. |