wex v24.10.0
Public Member Functions | List of all members
wex::factory::process Class Reference

This class offers core process. More...

#include <wex/factory/process.h>

Inheritance diagram for wex::factory::process:
Inheritance graph
[legend]

Public Member Functions

 process ()
 Default constructor.
 
virtual ~process ()
 Destructor, stops running process.
 
virtual bool async_system (const process_data &data)
 Starts the async process, collecting output into the out handler, and debug info in debug handler.
 
virtual int system (const process_data &data)
 Runs the sync process, collecting output in stdout and stderr.
 
void async_sleep_for (const std::chrono::milliseconds &ms)
 Sleeps for some milliseconds time.
 
const process_datadata () const
 Returns last or current data used by async_system or system.
 
bool is_debug () const
 Is this a debug process.
 
bool is_running () const
 Is this process running.
 
void set_handler_dbg (wxEvtHandler *eh)
 Sets debug event handler.
 
void set_handler_out (wxEvtHandler *eh)
 Sets out event handler.
 
const auto & std_err () const
 Returns the stderr.
 
const auto & std_out () const
 Returns the stdout.
 

Detailed Description

This class offers core process.

Member Function Documentation

◆ async_system()

virtual bool wex::factory::process::async_system ( const process_data & data)
virtual

Starts the async process, collecting output into the out handler, and debug info in debug handler.

You should have called set_handler_out or dbg before to set these. The output streams of the executing process are sent to these event handlers using wxPostEvent. Returns true if the async process is started.

Reimplemented in wex::process.

◆ system()

virtual int wex::factory::process::system ( const process_data & data)
virtual

Runs the sync process, collecting output in stdout and stderr.

It will execute the process and wait for it's exit, then returns the exit_code.

Reimplemented in wex::process, and wex::vcs_entry.