Dv::Util::Tty Class Reference

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

#include <tty.h>

Inheritance diagram for Dv::Util::Tty:
Inheritance graph
[legend]
Collaboration diagram for Dv::Util::Tty:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Tty (bool echo=false, time_t delay=0, unsigned int min_debug_level=3)
 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,
unsigned int  min_debug_level = 3 
)

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.
min_debug_level used if the object is connected to a debug master
See also:
Dv::Debugable
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 45 of file tty.h.


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

dvutil-1.0.10 [ 5 December, 2009]