LLDB mainline
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
lldb_private::Terminal Class Reference

#include <Terminal.h>

Classes

struct  Data
 

Public Types

enum class  Parity {
  No , Even , Odd , Space ,
  Mark
}
 
enum class  ParityCheck { No , ReplaceWithNUL , Ignore , Mark }
 

Public Member Functions

 Terminal (int fd=-1)
 
 ~Terminal ()=default
 
bool IsATerminal () const
 
int GetFileDescriptor () const
 
void SetFileDescriptor (int fd)
 
bool FileDescriptorIsValid () const
 
void Clear ()
 
llvm::Error SetEcho (bool enabled)
 
llvm::Error SetCanonical (bool enabled)
 
llvm::Error SetRaw ()
 
llvm::Error SetBaudRate (unsigned int baud_rate)
 
llvm::Error SetStopBits (unsigned int stop_bits)
 
llvm::Error SetParity (Parity parity)
 
llvm::Error SetParityCheck (ParityCheck parity_check)
 
llvm::Error SetHardwareFlowControl (bool enabled)
 

Protected Member Functions

llvm::Expected< DataGetData ()
 
llvm::Error SetData (const Data &data)
 

Protected Attributes

int m_fd
 

Friends

class TerminalState
 

Detailed Description

Definition at line 19 of file Terminal.h.

Member Enumeration Documentation

◆ Parity

enum class lldb_private::Terminal::Parity
strong
Enumerator
No 
Even 
Odd 
Space 
Mark 

Definition at line 21 of file Terminal.h.

◆ ParityCheck

Enumerator
No 
ReplaceWithNUL 
Ignore 
Mark 

Definition at line 29 of file Terminal.h.

Constructor & Destructor Documentation

◆ Terminal()

lldb_private::Terminal::Terminal ( int  fd = -1)
inline

Definition at line 41 of file Terminal.h.

◆ ~Terminal()

lldb_private::Terminal::~Terminal ( )
default

Member Function Documentation

◆ Clear()

void lldb_private::Terminal::Clear ( )
inline

Definition at line 53 of file Terminal.h.

References m_fd.

Referenced by lldb_private::TerminalState::Clear().

◆ FileDescriptorIsValid()

bool lldb_private::Terminal::FileDescriptorIsValid ( ) const
inline

Definition at line 51 of file Terminal.h.

References m_fd.

Referenced by GetData(), lldb_private::TerminalState::IsValid(), and SetData().

◆ GetData()

llvm::Expected< Terminal::Data > Terminal::GetData ( )
protected

◆ GetFileDescriptor()

int lldb_private::Terminal::GetFileDescriptor ( ) const
inline

Definition at line 47 of file Terminal.h.

References m_fd.

Referenced by lldb_private::TerminalState::Restore(), and lldb_private::TerminalState::Save().

◆ IsATerminal()

bool Terminal::IsATerminal ( ) const

Definition at line 31 of file Terminal.cpp.

References m_fd.

Referenced by GetData(), lldb_private::TerminalState::Save(), and SetData().

◆ SetBaudRate()

llvm::Error Terminal::SetBaudRate ( unsigned int  baud_rate)

Definition at line 273 of file Terminal.cpp.

References GetData(), SetData(), and termiosMissingError().

◆ SetCanonical()

llvm::Error Terminal::SetCanonical ( bool  enabled)

Definition at line 92 of file Terminal.cpp.

References GetData(), SetData(), and termiosMissingError().

Referenced by IOHandlerProcessSTDIO::Run().

◆ SetData()

llvm::Error Terminal::SetData ( const Data data)
protected

◆ SetEcho()

llvm::Error Terminal::SetEcho ( bool  enabled)

Definition at line 76 of file Terminal.cpp.

References GetData(), SetData(), and termiosMissingError().

Referenced by IOHandlerProcessSTDIO::Run().

◆ SetFileDescriptor()

void lldb_private::Terminal::SetFileDescriptor ( int  fd)
inline

Definition at line 49 of file Terminal.h.

References m_fd.

◆ SetHardwareFlowControl()

llvm::Error Terminal::SetHardwareFlowControl ( bool  enabled)

Definition at line 379 of file Terminal.cpp.

References GetData(), SetData(), and termiosMissingError().

◆ SetParity()

llvm::Error Terminal::SetParity ( Terminal::Parity  parity)

Definition at line 324 of file Terminal.cpp.

References GetData(), Mark, No, Odd, SetData(), Space, and termiosMissingError().

◆ SetParityCheck()

llvm::Error Terminal::SetParityCheck ( Terminal::ParityCheck  parity_check)

Definition at line 357 of file Terminal.cpp.

References GetData(), Ignore, Mark, No, SetData(), and termiosMissingError().

◆ SetRaw()

llvm::Error Terminal::SetRaw ( )

Definition at line 108 of file Terminal.cpp.

References GetData(), SetData(), and termiosMissingError().

◆ SetStopBits()

llvm::Error Terminal::SetStopBits ( unsigned int  stop_bits)

Definition at line 299 of file Terminal.cpp.

References GetData(), SetData(), and termiosMissingError().

Friends And Related Function Documentation

◆ TerminalState

friend class TerminalState
friend

Definition at line 79 of file Terminal.h.

Member Data Documentation

◆ m_fd

int lldb_private::Terminal::m_fd
protected

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