openMSX
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
openmsx::CliConnection Class Referenceabstract

#include <CliConnection.hh>

Inheritance diagram for openmsx::CliConnection:
Inheritance graph
[legend]
Collaboration diagram for openmsx::CliConnection:
Collaboration graph
[legend]

Public Member Functions

void setUpdateEnable (CliComm::UpdateType type, bool value)
 
bool getUpdateEnable (CliComm::UpdateType type) const
 
void start ()
 Starts the helper thread. More...
 
- Public Member Functions inherited from openmsx::CliListener
virtual ~CliListener ()
 

Protected Member Functions

 CliConnection (CommandController &commandController, EventDistributor &eventDistributor)
 
 ~CliConnection ()
 
virtual void output (string_ref message)=0
 
void end ()
 End this connection by sending the closing tag and then closing the stream. More...
 
virtual void close ()=0
 Close the connection. More...
 
void startOutput ()
 Send opening XML tag, should be called exactly once by a subclass shortly after opening a connection. More...
 
- Protected Member Functions inherited from openmsx::CliListener
 CliListener ()
 
- Protected Member Functions inherited from openmsx::Runnable
 ~Runnable ()
 
virtual void run ()=0
 

Protected Attributes

AdhocCliCommParser parser
 
Thread thread
 

Detailed Description

Definition at line 18 of file CliConnection.hh.

Constructor & Destructor Documentation

openmsx::CliConnection::CliConnection ( CommandController commandController,
EventDistributor eventDistributor 
)
protected
openmsx::CliConnection::~CliConnection ( )
protected

Member Function Documentation

virtual void openmsx::CliConnection::close ( )
protectedpure virtual

Close the connection.

After this method is called, calls to output() should be ignored.

Referenced by getUpdateEnable().

void openmsx::CliConnection::end ( )
protected

End this connection by sending the closing tag and then closing the stream.

Subclasses should call this method at the start of their destructor.

Definition at line 124 of file CliConnection.cc.

Referenced by getUpdateEnable(), openmsx::StdioConnection::output(), and openmsx::SocketConnection::~SocketConnection().

bool openmsx::CliConnection::getUpdateEnable ( CliComm::UpdateType  type) const
inline

Definition at line 25 of file CliConnection.hh.

References CliConnection(), close(), end(), output(), start(), startOutput(), and ~CliConnection().

Referenced by ~CliConnection().

virtual void openmsx::CliConnection::output ( string_ref  message)
protectedpure virtual
void openmsx::CliConnection::setUpdateEnable ( CliComm::UpdateType  type,
bool  value 
)
inline

Definition at line 22 of file CliConnection.hh.

Referenced by openmsx::GlobalCommandController::tabCompletion().

void openmsx::CliConnection::start ( )

Starts the helper thread.

Called when this CliConnection is added to GlobalCliComm (and after it's allowed to respond to external commands). Subclasses should themself send the opening tag (startOutput()).

Definition at line 119 of file CliConnection.cc.

Referenced by getUpdateEnable().

void openmsx::CliConnection::startOutput ( )
protected

Send opening XML tag, should be called exactly once by a subclass shortly after opening a connection.

Cannot be implemented in the base class because some subclasses (want to send data before this tag).

Definition at line 114 of file CliConnection.cc.

Referenced by getUpdateEnable(), openmsx::StdioConnection::output(), and openmsx::SocketConnection::~SocketConnection().

Member Data Documentation

AdhocCliCommParser openmsx::CliConnection::parser
protected
Thread openmsx::CliConnection::thread
protected

Definition at line 62 of file CliConnection.hh.

Referenced by CliConnection(), and openmsx::StdioConnection::output().


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