CUserInterface Class Reference

List of all members.

Public Member Functions

void Initialize (CConsoleBase *aConsole, CTimerEntry *aTimerEntry)
void RunL ()
void DoCancel ()
 ~CUserInterface ()
void ReadFunc ()
void Initialize (CConsoleBase *aConsole, CProducer *aProducer)
void RunL ()
void DoCancel ()
void ReadFunc ()

Static Public Member Functions

static CUserInterfaceNewL (CConsoleBase *aConsole, CTimerEntry *aTimerEntry)
static CUserInterfaceNewL (CConsoleBase *aConsole, CProducer *aProducer)

Detailed Description

This class processes key press events from the console. The example prints a menu and waits for the user to select an option from the menu. The CUserInterface::RunL() function handles the asynchronous key press event.

Definition at line 43 of file userinterface.h.


Constructor & Destructor Documentation

CUserInterface::~CUserInterface (  ) 

Destructor.

Definition at line 113 of file userinterface.cpp.


Member Function Documentation

CUserInterface * CUserInterface::NewL ( CConsoleBase *  aConsole,
CTimerEntry aTimerEntry 
) [static]

The static function to create an object of the CUserInterface class.

Parameters:
aConsole The console object.
aTimerEntry A pointer to an object of the CTimerEntry class.
Returns:
A CUserInterface object.

Definition at line 44 of file userinterface.cpp.

void CUserInterface::Initialize ( CConsoleBase *  aConsole,
CTimerEntry aTimerEntry 
)

Initialize the data members of the CUserInterface class.

Parameters:
aConsole The console object.
aTimerEntry A pointer to an object of the CTimerEntry class.

Definition at line 56 of file userinterface.cpp.

void CUserInterface::RunL (  ) 

Handles the key press events from the console. It stops the active scheduler if any key is pressed.

Handles the key press events from the console. The following actions are defined for a key press event:

  • Call the CPRoducer::Produce() function if 'p' is pressed
  • Call the CPRoducer::Display() function if 'd' is pressed
  • Stop the active scheduler if any other key is pressed

Definition at line 75 of file userinterface.cpp.

void CUserInterface::DoCancel (  ) 

Cancel any outstanding request.

Definition at line 101 of file userinterface.cpp.

void CUserInterface::ReadFunc (  ) 

Issues an outstanding request to get a keystroke from the console.

Definition at line 88 of file userinterface.cpp.

CUserInterface * CUserInterface::NewL ( CConsoleBase *  aConsole,
CProducer aProducer 
) [static]

The static function to create an object of the CUserInterface class.

Parameters:
aConsole The console object.
aProducer A pointer to an object of the CProducer class.
aConsumer A pointer to an object of the CConsumer class.
Returns:
A CUserInterface object.

Definition at line 45 of file userinterface.cpp.

void CUserInterface::Initialize ( CConsoleBase *  aConsole,
CProducer aProducer 
)

Initialize the data members of the CUserInterface class.

Parameters:
aConsole The console object.
aProducer A pointer to an object of the CProducer class.
aConsumer A pointer to an object of the CConsumer class.

Definition at line 58 of file userinterface.cpp.


Generated by  doxygen 1.6.2