Monero
Loading...
Searching...
No Matches
epee::async_stdin_reader Class Reference

#include <console_handler.h>

Public Member Functions

 async_stdin_reader ()
 ~async_stdin_reader ()
bool get_line (std::string &line)
bool eos () const
void stop ()
void cancel ()

Private Types

enum  t_state {
  state_init , state_success , state_error , state_cancelled ,
  state_eos
}

Private Member Functions

bool start_read ()
bool wait_read ()
bool wait_stdin_data ()
void reader_thread_func ()

Private Attributes

boost::thread m_reader_thread
std::atomic< bool > m_run
std::string m_line
bool m_has_read_request
t_state m_read_status
boost::mutex m_request_mutex
boost::mutex m_response_mutex
boost::condition_variable m_request_cv
boost::condition_variable m_response_cv

Member Enumeration Documentation

◆ t_state

Enumerator
state_init 
state_success 
state_error 
state_cancelled 
state_eos 

Constructor & Destructor Documentation

◆ async_stdin_reader()

epee::async_stdin_reader::async_stdin_reader ( )
inline

◆ ~async_stdin_reader()

epee::async_stdin_reader::~async_stdin_reader ( )
inline

Member Function Documentation

◆ cancel()

void epee::async_stdin_reader::cancel ( )
inline

◆ eos()

bool epee::async_stdin_reader::eos ( ) const
inline

◆ get_line()

bool epee::async_stdin_reader::get_line ( std::string & line)
inline

◆ reader_thread_func()

void epee::async_stdin_reader::reader_thread_func ( )
inlineprivate

◆ start_read()

bool epee::async_stdin_reader::start_read ( )
inlineprivate

◆ stop()

void epee::async_stdin_reader::stop ( )
inline

◆ wait_read()

bool epee::async_stdin_reader::wait_read ( )
inlineprivate

◆ wait_stdin_data()

bool epee::async_stdin_reader::wait_stdin_data ( )
inlineprivate

Member Data Documentation

◆ m_has_read_request

bool epee::async_stdin_reader::m_has_read_request
private

◆ m_line

std::string epee::async_stdin_reader::m_line
private

◆ m_read_status

t_state epee::async_stdin_reader::m_read_status
private

◆ m_reader_thread

boost::thread epee::async_stdin_reader::m_reader_thread
private

◆ m_request_cv

boost::condition_variable epee::async_stdin_reader::m_request_cv
private

◆ m_request_mutex

boost::mutex epee::async_stdin_reader::m_request_mutex
private

◆ m_response_cv

boost::condition_variable epee::async_stdin_reader::m_response_cv
private

◆ m_response_mutex

boost::mutex epee::async_stdin_reader::m_response_mutex
private

◆ m_run

std::atomic<bool> epee::async_stdin_reader::m_run
private

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