PConsoleChannel Class Reference

This class defines an I/O channel that communicates via a console. More...

#include <conchan.h>

Inheritance diagram for PConsoleChannel:

PChannel PObject List of all members.

Public Types

 StandardInput
 StandardOutput
 StandardError
enum  ConsoleType { StandardInput, StandardOutput, StandardError }

Public Member Functions

PString GetName () const
 Get the platform and I/O channel type name of the channel.
PBoolean Close ()
 Close the channel, shutting down the link to the data source.
Construction
 PConsoleChannel ()
 Create a new console channel object, leaving it unopen.
 PConsoleChannel (ConsoleType type)
 Create a new console channel object, connecting to the I/O stream.
Overrides from PChannel
virtual bool SetLocalEcho (bool localEcho)
 Set local echo mode.
Open functions
virtual PBoolean Open (ConsoleType type)
 Open a serial channal.

Detailed Description

This class defines an I/O channel that communicates via a console.


Member Enumeration Documentation

enum PConsoleChannel::ConsoleType

Enumerator:
StandardInput 
StandardOutput 
StandardError 


Constructor & Destructor Documentation

PConsoleChannel::PConsoleChannel (  ) 

Create a new console channel object, leaving it unopen.

PConsoleChannel::PConsoleChannel ( ConsoleType  type  ) 

Create a new console channel object, connecting to the I/O stream.

Parameters:
type  Type of console for object


Member Function Documentation

PBoolean PConsoleChannel::Close (  )  [virtual]

Close the channel, shutting down the link to the data source.

Returns:
true if the channel successfully closed.

Reimplemented from PChannel.

PString PConsoleChannel::GetName (  )  const [virtual]

Get the platform and I/O channel type name of the channel.

For example, it would return the filename in PFile type channels.

Returns:
the name of the channel.

Reimplemented from PChannel.

virtual PBoolean PConsoleChannel::Open ( ConsoleType  type  )  [virtual]

Open a serial channal.

The channel is opened it on the specified port and with the specified attributes.

Parameters:
type  Type of console for object

virtual bool PConsoleChannel::SetLocalEcho ( bool  localEcho  )  [virtual]

Set local echo mode.

For some classes of channel, e.g. PConsoleChannel, data read by this channel is automatically echoed. This disables the function so things like password entry can work.

Default behaviour does nothing and return true if the channel is open.

Reimplemented from PChannel.


The documentation for this class was generated from the following file:
Generated on Fri Oct 14 01:44:11 2011 for PTLib by  doxygen 1.4.7