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

#include <ProcessWinPty.h>

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

Classes

struct  Private
 

Public Member Functions

 ProcessWinPty ()
 
 ~ProcessWinPty () override
 
bool is_running () const override
 
int read_output (char *dstptr, int maxlen) override
 
void write_input (char const *ptr, int len) override
 
void close_input ()
 
void start (std::string const &cmdline, std::string const &env, bool use_input) override
 
void stop () override
 
ProcessResult wait (int time=INT_MAX) override
 
int get_exit_code () const override
 
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

◆ ProcessWinPty()

ProcessWinPty::ProcessWinPty ( )

◆ ~ProcessWinPty()

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

Member Function Documentation

◆ close_input()

void ProcessWinPty::close_input ( )
virtual

Implements AbstractPtyProcess.

◆ get_error_message()

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

◆ get_exit_code()

int ProcessWinPty::get_exit_code ( ) const
overridevirtual

Implements AbstractPtyProcess.

◆ is_running()

bool ProcessWinPty::is_running ( ) const
overridevirtual

Implements AbstractPtyProcess.

◆ read_output()

int ProcessWinPty::read_output ( char *  dstptr,
int  maxlen 
)
overridevirtual

Implements AbstractPtyProcess.

Here is the call graph for this function:

◆ run()

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

◆ start()

void ProcessWinPty::start ( std::string const &  cmdline,
std::string const &  env,
bool  use_input 
)
overridevirtual

Implements AbstractPtyProcess.

Here is the call graph for this function:

◆ stop()

void ProcessWinPty::stop ( )
overridevirtual

Implements AbstractPtyProcess.

Here is the call graph for this function:

◆ wait()

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

Implements AbstractPtyProcess.

◆ write_input()

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

Implements AbstractPtyProcess.

Member Data Documentation

◆ m

Private* ProcessWinPty::m
private

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