ZG  "1.00
 All Classes Namespaces Files Functions Variables Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | List of all members
ITextCommandReceiver Class Referenceabstract

Interface for an object that can receive text commands from the user. More...

#include <ZGStdinSession.h>

Inheritance diagram for ITextCommandReceiver:
Inheritance graph
[legend]

Public Member Functions

 ITextCommandReceiver ()
 
virtual ~ITextCommandReceiver ()
 
virtual bool IsReadyForTextCommands () const =0
 Should be implemented to true iff this object is ready to have its TextCommandReceived() method called at this time; or false if the caller should wait until later. More...
 
virtual bool TextCommandReceived (const String &text)=0
 Called whenever the user types in a text command. More...
 

Protected Member Functions

bool ParseGenericTextCommand (const String &cmd)
 Tries to handle any text commands that can be handled generically; that is, any commands that can be handled without knowing anything about this particular application. More...
 

Detailed Description

Interface for an object that can receive text commands from the user.

This interface is typically passed to a ZGStdinSession object which will call its methods when appropriate.

Definition at line 15 of file ZGStdinSession.h.

Constructor & Destructor Documentation

Definition at line 18 of file ZGStdinSession.h.

virtual ~ITextCommandReceiver ( )
inlinevirtual

Definition at line 19 of file ZGStdinSession.h.

Member Function Documentation

virtual bool IsReadyForTextCommands ( ) const
pure virtual

Should be implemented to true iff this object is ready to have its TextCommandReceived() method called at this time; or false if the caller should wait until later.

Implemented in ZGPeerSession.

bool ParseGenericTextCommand ( const String &  cmd)
protected

Tries to handle any text commands that can be handled generically; that is, any commands that can be handled without knowing anything about this particular application.

This logic is broken out into a separate function so that it can be called by the stdin-text handlers of various daemons.

Parameters
cmdthe command text to parse
Returns
true if the command was handled, false if it wasn't.
virtual bool TextCommandReceived ( const String &  text)
pure virtual

Called whenever the user types in a text command.

Parameters
textThe text the user typed in to stdin.
Returns
true if the command was recognized and handled, or false if the command wasn't recognized.

Implemented in ZGPeerSession.


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