Solo Controller Documentation 1.0
Documentation for the Solo Controller
 
Loading...
Searching...
No Matches
ErrMsg Class Reference

#include <ErrMsg.h>

Classes

struct  EndlToken
 Token that indicates the end of a line in the error message. More...
 

Public Member Functions

ErrMsgerror (void)
 Sets up the display to show an error message.
 
ErrMsgwarning (void)
 Sets up the display to shown a warning message.
 
template<typename T>
ErrMsgoperator<< (const T value)
 Adds information to the error message.
 
void send (void)
 Displays the error message on the screen.
 
void checkForUserInput (void)
 Method used by TaskManager. Asks ErrMsg check to see if the screen has been touched.
 

Static Public Member Functions

static ErrMsggetInstance (void)
 Returns reference to the ErrMsg object.
 

Static Public Attributes

static EndlToken endl
 End of line token used by the operator<< method.
 

Member Function Documentation

◆ checkForUserInput()

void ErrMsg::checkForUserInput ( void )

Method used by TaskManager. Asks ErrMsg check to see if the screen has been touched.

Parameters
None.

This method is only used when a warning message is displayed. TaskManager will call this method periodically to check if the user has acknowledged the warning message. If the user has acknowledged the warning message, the warning message is removed from the screen and control is returned to the original menu.

◆ error()

ErrMsg & ErrMsg::error ( void )

Sets up the display to show an error message.

Error messages halt the program and display the error message on the screen.

Parameters
None.
Returns
Reference to this object

◆ getInstance()

static ErrMsg & ErrMsg::getInstance ( void )
inlinestatic

Returns reference to the ErrMsg object.

Returns
Reference to the ErrMsg object

◆ operator<<()

template<typename T>
ErrMsg & ErrMsg::operator<< ( const T value)
inline

Adds information to the error message.

Template Parameters
TThe type of the value to be added to the error message.
Parameters
[in]valueThe value to be added to the error message.

This method adds information (char [], integers, booleans, etc.) to the error message. The information is displayed on the screen when the send() method is used. There is also a specialization of this method that accepts the ErrMsg::endl token as a parameter. This token is used to indicate the end of a line in the error message. Doxygen does a poor job of documenting templated methods. The best way to understand how this method works is to look at the specializations in the source files.

Returns
Reference to this object

◆ send()

void ErrMsg::send ( void )

Displays the error message on the screen.

Parameters
None.

This method is called after the error message has been built up using the << operator.

◆ warning()

ErrMsg & ErrMsg::warning ( void )

Sets up the display to shown a warning message.

Warning messages do not halt the program. It displays the warning message on the screen. When the user touches the screen, the warning message is removed.

Parameters
None.
Returns
Reference to this object

Member Data Documentation

◆ endl

EndlToken ErrMsg::endl
static

End of line token used by the operator<< method.


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