Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

Dv::Util::Tty Class Reference

An iostream class that provides raw unbuffered input and output to /dev/tty. More...

#include <tty.h>

List of all members.

Public Member Functions

 Tty (bool echo=false, time_t delay=0, std::ostream *debug=0)
 Open /dev/tty as an unbuffered stream.
 ~Tty ()
 Destructor.
bool timedout () const
void reset ()
 Clear the flags and set timedout to false.
void close ()
 Close the underlying file descriptor.

Private Attributes

bool echo_


Detailed Description

An iostream class that provides raw unbuffered input and output to /dev/tty.

Definition at line 20 of file tty.h.


Constructor & Destructor Documentation

Dv::Util::Tty::Tty bool  echo = false,
time_t  delay = 0,
std::ostream *  debug = 0
 

Open /dev/tty as an unbuffered stream.

Parameters:
echo if true, characters will be echoed
delay if nonzero, an input operation will fail, and the member function timedout() will return true, if no character is typed for delay millisecs.
debug pointer to stream on which debug information will be written.

Dv::Util::Tty::~Tty  ) 
 

Destructor.


Member Function Documentation

bool Dv::Util::Tty::timedout  )  const
 

Returns:
true iff the last input operation timedout. This condition can be reset using Tty::reset().

void Dv::Util::Tty::reset  ) 
 

Clear the flags and set timedout to false.

void Dv::Util::Tty::close  ) 
 

Close the underlying file descriptor.


Member Data Documentation

bool Dv::Util::Tty::echo_ [private]
 

Definition at line 44 of file tty.h.


The documentation for this class was generated from the following file:
dvutil-0.13.15 [30 December, 2004]