LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::status Class Reference

Base class for all lti objects that can have a status text. More...

#include <ltiStatus.h>

Inheritance diagram for lti::status:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

lti::status::status (  ) 

default constructor

virtual lti::status::~status (  )  [virtual]

destructor


Member Function Documentation

virtual void lti::status::appendStatusString ( const status other  )  const [virtual]

Append the status string of another functor to this functors status string.

To achieve better readability of the resulting message a new line is started with the other functor's name and the message.

Parameters:
other functor whose status string is to be append to this 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 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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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().


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:26:44 2010 for LTI-Lib by Doxygen 1.6.1