Guitar
Classes | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
ProcessPosixPty Class Reference

#include <BasicProcessPosix.h>

Inheritance diagram for ProcessPosixPty:
Inheritance graph
[legend]
Collaboration diagram for ProcessPosixPty:
Collaboration graph
[legend]

Classes

struct  Private
 

Public Member Functions

 ProcessPosixPty ()
 
 ~ProcessPosixPty () override
 
bool is_running () const override
 
int read_output (char *ptr, int len) override
 
void write_input (char const *ptr, int len) override
 
void close_input ()
 
void start (std::string const &cmd, std::string const &env, bool use_input) override
 
ProcessResult wait (int time=INT_MAX) override
 
void stop () override
 
int get_exit_code () const override
 
int get_error_code () const
 
std::string const & get_error_message () const
 
- Public Member Functions inherited from AbstractPtyProcess
virtual ~AbstractPtyProcess ()
 
void set_change_dir (process::helper::dir_string_t const &dir)
 
void set_max_output_queue_size (size_t n)
 
void set_completion_callback (std::function< void(bool, std::shared_ptr< void >)> fn, std::shared_ptr< void > userdata)
 
void notify_completed ()
 
std::string get_message () const
 
void clear_message ()
 
std::vector< char > const & stdout_bytes () const
 
std::vector< char > const & stderr_bytes () const
 

Protected Member Functions

void run ()
 
- Protected Member Functions inherited from AbstractPtyProcess
void write_output (char const *buf, size_t len)
 
int pop_output (char *ptr, int len)
 

Private Attributes

Privatem
 

Additional Inherited Members

- Protected Attributes inherited from AbstractPtyProcess
std::mutex mutex_
 
std::condition_variable cond_
 
process::helper::dir_string_t change_dir_
 
std::shared_ptr< void > user_data_
 
std::function< void(bool, std::shared_ptr< void >)> completed_fn_
 
std::deque< char > output_queue_
 
std::vector< char > output_vector_
 
std::vector< char > stderr_bytes_
 
size_t max_output_queue_size_ = 0
 

Constructor & Destructor Documentation

◆ ProcessPosixPty()

ProcessPosixPty::ProcessPosixPty ( )

◆ ~ProcessPosixPty()

ProcessPosixPty::~ProcessPosixPty ( )
override
Here is the call graph for this function:

Member Function Documentation

◆ close_input()

void ProcessPosixPty::close_input ( )
virtual

Implements AbstractPtyProcess.

◆ get_error_code()

int ProcessPosixPty::get_error_code ( ) const

◆ get_error_message()

std::string const & ProcessPosixPty::get_error_message ( ) const

◆ get_exit_code()

int ProcessPosixPty::get_exit_code ( ) const
overridevirtual

Implements AbstractPtyProcess.

◆ is_running()

bool ProcessPosixPty::is_running ( ) const
overridevirtual

Implements AbstractPtyProcess.

◆ read_output()

int ProcessPosixPty::read_output ( char *  ptr,
int  len 
)
overridevirtual

Implements AbstractPtyProcess.

Here is the call graph for this function:

◆ run()

void ProcessPosixPty::run ( )
protected
Here is the call graph for this function:

◆ start()

void ProcessPosixPty::start ( std::string const &  cmd,
std::string const &  env,
bool  use_input 
)
overridevirtual

Implements AbstractPtyProcess.

Here is the call graph for this function:

◆ stop()

void ProcessPosixPty::stop ( )
overridevirtual

Implements AbstractPtyProcess.

Here is the call graph for this function:

◆ wait()

ProcessResult ProcessPosixPty::wait ( int  time = INT_MAX)
overridevirtual

Implements AbstractPtyProcess.

◆ write_input()

void ProcessPosixPty::write_input ( char const *  ptr,
int  len 
)
overridevirtual

Implements AbstractPtyProcess.

Member Data Documentation

◆ m

Private* ProcessPosixPty::m
private

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