PCL
ExternalProcess Event Handlers

Typedefs

using pcl::ExternalProcess::process_error_event_handler = void(Control::*)(ExternalProcess &sender, error_code error)
 
using pcl::ExternalProcess::process_event_handler = void(Control::*)(ExternalProcess &sender)
 
using pcl::ExternalProcess::process_exit_event_handler = void(Control::*)(ExternalProcess &sender, int exitCode, bool exitOk)
 

Functions

void pcl::ExternalProcess::OnError (process_error_event_handler handler, Control &receiver)
 
void pcl::ExternalProcess::OnFinished (process_exit_event_handler handler, Control &receiver)
 
void pcl::ExternalProcess::OnStandardErrorDataAvailable (process_event_handler handler, Control &receiver)
 
void pcl::ExternalProcess::OnStandardOutputDataAvailable (process_event_handler handler, Control &receiver)
 
void pcl::ExternalProcess::OnStarted (process_event_handler handler, Control &receiver)
 

Detailed Description

Typedef Documentation

◆ process_error_event_handler

Defines the prototype of a process error event handler.

A process error event is generated when an ExternalProcess instance reports an error condition, such as an I/O error, a nonexistent executable file or lack of execution permissions.

Parameters
senderThe object that sends a process error event.
errorIdentifies the error condition that generated the event.

Definition at line 699 of file ExternalProcess.h.

◆ process_event_handler

using pcl::ExternalProcess::process_event_handler = void (Control::*)( ExternalProcess& sender )

Defines the prototype of a process event handler.

A process event is generated when an ExternalProcess instance changes its state, or generates a simple notification.

Parameters
senderThe object that sends a process event.

Definition at line 666 of file ExternalProcess.h.

◆ process_exit_event_handler

using pcl::ExternalProcess::process_exit_event_handler = void (Control::*)( ExternalProcess& sender, int exitCode, bool exitOk )

Defines the prototype of a process exit event handler.

A process exit event is generated when an ExternalProcess instance notifies that a running process has finished execution.

Parameters
senderThe object that sends a process exit event.
exitCodeThe process' exit code. Typically, this is the return value of the main() function in the process.
exitOkTrue if the process finished execution normally. False if the process crashed.

Definition at line 684 of file ExternalProcess.h.

Function Documentation

◆ OnError()

void pcl::ExternalProcess::OnError ( process_error_event_handler  handler,
Control receiver 
)

Sets the handler for process error events generated by this ExternalProcess object. A process error event is generated when the process reports an error condition.

Parameters
handlerThe event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive process error events from this object.

◆ OnFinished()

void pcl::ExternalProcess::OnFinished ( process_exit_event_handler  handler,
Control receiver 
)

Sets the handler for process finished events generated by this ExternalProcess object. A process finished event is generated when the running process has just finished execution.

Parameters
handlerThe event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive process finished events from this object.

◆ OnStandardErrorDataAvailable()

void pcl::ExternalProcess::OnStandardErrorDataAvailable ( process_event_handler  handler,
Control receiver 
)

Sets the handler for stderr data available events generated by this ExternalProcess object. These events are generated when the running process sends data through its standard error stream, and the data is ready to be read.

Parameters
handlerThe event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive stderr data available events from this object.

◆ OnStandardOutputDataAvailable()

void pcl::ExternalProcess::OnStandardOutputDataAvailable ( process_event_handler  handler,
Control receiver 
)

Sets the handler for stdout data available events generated by this ExternalProcess object. These events are generated when the running process sends data through its standard output stream, and the data is ready to be read.

Parameters
handlerThe event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive stdout data available events from this object.

◆ OnStarted()

void pcl::ExternalProcess::OnStarted ( process_event_handler  handler,
Control receiver 
)

Sets the handler for process started events generated by this ExternalProcess object. A process started event is generated when the process has just started and is running.

Parameters
handlerThe event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive process started events from this object.