52 #ifndef __PCL_ExternalProcess_h
53 #define __PCL_ExternalProcess_h
57 #ifndef __PCL_BUILDING_PIXINSIGHT_APPLICATION
84 namespace ExternalProcessError
113 #ifndef __PCL_WINDOWS
131 using error_code = ExternalProcessError::value_type;
829 EventHandlers() =
default;
830 EventHandlers(
const EventHandlers& ) =
default;
831 EventHandlers& operator =(
const EventHandlers& ) =
default;
837 void* CloneHandle()
const override;
839 friend class ExternalProcessPrivate;
840 friend class ExternalProcessEventDispatcher;
Client-side interface to a PixInsight Control object.
Execution of external programs.
void RedirectStandardInput(const String &filePath)
static pid_type StartProgram(const String &program, const StringList &arguments=StringList(), const String &workingDirectory=String())
void CloseStandardInput()
bool WaitForDataWritten(int ms=6000)
void Write(const ByteArray &data)
bool WaitForFinished(int ms=6000)
bool WaitForStarted(int ms=6000)
void Write(const IsoString &text)
ByteArray StandardOutput()
void SetEnvironment(const StringList &environment)
bool WaitForDataAvailable(int ms=6000)
void RedirectStandardOutput(ExternalProcess &process)
ExternalProcess(ExternalProcess &&)=delete
void Write(const char *text)
StringList Environment() const
size_type BytesToWrite() const
void RedirectStandardError(const String &filePath, bool append=false)
ExternalProcess(const ExternalProcess &)=delete
size_type BytesAvailable() const
ByteArray StandardError()
static int ExecuteProgram(const String &program, const StringList &arguments=StringList())
void EnsureUnique() override
void Start(const String &program, const StringList &arguments=StringList())
void Write(const void *data, size_type count)
~ExternalProcess() override
void Write(const String &text)
void SetWorkingDirectory(const String &dirPath)
void CloseStandardOutput()
static ExternalProcess & Null()
void CloseStandardError()
String WorkingDirectory() const
void RedirectStandardOutput(const String &filePath, bool append=false)
Eight-bit string (ISO/IEC-8859-1 or UTF-8 string)
Root base class for all user interface objects.
void OnStandardOutputDataAvailable(process_event_handler handler, Control &receiver)
void OnStandardErrorDataAvailable(process_event_handler handler, Control &receiver)
void(Control::*)(ExternalProcess &sender, int exitCode, bool exitOk) process_exit_event_handler
void OnError(process_error_event_handler handler, Control &receiver)
void(Control::*)(ExternalProcess &sender) process_event_handler
void(Control::*)(ExternalProcess &sender, error_code error) process_error_event_handler
void OnStarted(process_event_handler handler, Control &receiver)
void OnFinished(process_exit_event_handler handler, Control &receiver)