latest version v1.9 - last update 10 Apr 2010 |
Base class for all lti objects that can have a status text. More...
#include <ltiStatus.h>
Public Member Functions | |
status () | |
virtual | ~status () |
virtual const char * | getStatusString () const |
virtual void | setStatusString (const char *msg) const |
virtual void | appendStatusString (const char *msg) const |
virtual void | appendStatusString (const int &msg) const |
virtual void | appendStatusString (const double &msg) const |
virtual void | appendStatusString (const status &other) const |
Base class for all lti objects that can have a status text.
The original interface of this class was previously embedded in the lti::functor class, but has been moved in a separate class in order to allow objects other than functors to have a status.
lti::status::status | ( | ) |
default constructor
virtual lti::status::~status | ( | ) | [virtual] |
destructor
virtual void lti::status::appendStatusString | ( | const status & | other | ) | const [virtual] |
virtual void lti::status::appendStatusString | ( | const double & | msg | ) | const [virtual] |
append a double value to the current status string.
Take care to reset the status string by calling setStatusString() for each call of an apply() or similar method. appendStatusString() should only be used after setStatusString() has been called.
msg | double value to be appended to the current status string. |
Note that the change of the status string is not considered as a change in the functor status.
virtual void lti::status::appendStatusString | ( | const int & | msg | ) | const [virtual] |
append an integer value to the current status string.
Take care to reset the status string by calling setStatusString() for each call of an apply() or similar method. appendStatusString() should only be used after setStatusString() has been called.
msg | integer value to be appended to the current status string. |
Note that the change of the status string is not considered as a change in the functor status.
virtual void lti::status::appendStatusString | ( | const char * | msg | ) | const [virtual] |
append a message to the current status string.
Take care to reset the status string by calling setStatusString() for each call of an apply() or similar method. appendStatusString() should only be used after setStatusString() has been called.
msg | message to be appended to the current status string. |
Note that the change of the status string is not considered as a change in the functor status.
virtual const char* lti::status::getStatusString | ( | ) | const [virtual] |
return the last message set with setStatusString().
This will never return 0. If no status-string has been set yet an empty string (pointer to a string with only the char(0)) will be returned.
virtual void lti::status::setStatusString | ( | const char * | msg | ) | const [virtual] |
set a status string.
msg | the const string to be reported next time by getStatusString(). The given string will be copied. This message will be usually set within the apply methods to indicate an error cause. |
Note that the change of the status string is not considered as a change in the functor status.
Referenced by lti::studentDistribution::acceptLUT().