MySQL 8.0.39
Source Code Documentation
Tty Class Reference

#include <tty.h>

Classes

class  Flags
 

Public Types

using fd_type = int
 
using state_type = termios
 

Public Member Functions

 Tty (fd_type fd)
 
 Tty (const Tty &)=delete
 
Ttyoperator= (const Tty &)=delete
 
 ~Tty ()
 restore the state of the Tty if we changed it. More...
 
std::pair< uint64_t, uint64_t > window_size () const
 
state_type attrs () const
 
void attrs (state_type &tp)
 
void restore_attrs ()
 
void echo (bool on)
 
bool is_tty () const
 
bool ensure_vt100 ()
 

Static Public Member Functions

static fd_type fd_from_stream (std::ostream &os)
 
static fd_type fd_from_stream (std::istream &is)
 

Private Attributes

fd_type fd_
 
state_type state_
 
bool is_saved_ {false}
 

Member Typedef Documentation

◆ fd_type

using Tty::fd_type = int

◆ state_type

using Tty::state_type = termios

Constructor & Destructor Documentation

◆ Tty() [1/2]

Tty::Tty ( fd_type  fd)
inline

◆ Tty() [2/2]

Tty::Tty ( const Tty )
delete

◆ ~Tty()

Tty::~Tty ( )
inline

restore the state of the Tty if we changed it.

Member Function Documentation

◆ attrs() [1/2]

Tty::state_type Tty::attrs ( ) const

◆ attrs() [2/2]

void Tty::attrs ( Tty::state_type tp)

◆ echo()

void Tty::echo ( bool  on)

◆ ensure_vt100()

bool Tty::ensure_vt100 ( )

◆ fd_from_stream() [1/2]

Tty::fd_type Tty::fd_from_stream ( std::istream &  is)
static

◆ fd_from_stream() [2/2]

Tty::fd_type Tty::fd_from_stream ( std::ostream &  os)
static

◆ is_tty()

bool Tty::is_tty ( ) const

◆ operator=()

Tty & Tty::operator= ( const Tty )
delete

◆ restore_attrs()

void Tty::restore_attrs ( )
inline

◆ window_size()

std::pair< uint64_t, uint64_t > Tty::window_size ( ) const

Member Data Documentation

◆ fd_

fd_type Tty::fd_
private

◆ is_saved_

bool Tty::is_saved_ {false}
private

◆ state_

state_type Tty::state_
private

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