|
Nebula
|
#include <posixprocess.h>
Inherits Base::Process.
Public Member Functions | |
| PosixProcess () | |
| constructor | |
| bool | LaunchWait () const |
| launch application and wait for its termination | |
| bool | Launch () |
| launch application (returns immediately) | |
| bool | IsRunning () |
| Gets the state of application. Call this per frame. | |
| void | UpdateStdoutStream () |
| Read data from the captured stdout and writes it to the stream. | |
| bool | CheckIfExists () |
| Detect if an instance of the process is already running. | |
| Public Member Functions inherited from Base::Process | |
| Process () | |
| constructor | |
| void | SetExecutable (const IO::URI &uri) |
| set the executable path | |
| void | SetWorkingDirectory (const IO::URI &uri) |
| set working directory | |
| void | SetArguments (const Util::String &args) |
| set command line arguments | |
| void | SetNoConsoleWindow (bool b) |
| do not open a console window for the new process | |
| void | SetStdoutCaptureStream (const Ptr< IO::Stream > &stream) |
| set optional stdout capture stream | |
| const Ptr< IO::Stream > & | GetStdoutCaptureStream () const |
| get optional pointer to stdout capture stream | |
| void | SetStderrCaptureStream (const Ptr< IO::Stream > &stream) |
| set optional stderr capture stream | |
| const Ptr< IO::Stream > & | GetStderrCaptureStream () const |
| get optional pointer to stderr capture stream | |
Static Public Member Functions | |
| static bool | CheckIfExists (const IO::URI &program) |
| Detect if an instance of a given process is running. | |
Private Member Functions | |
| void | CleanUp () const |
| cleanup all pipes | |
Private Attributes | |
| int | inPipe |
| int | outPipe |
| int | errPipe |
| pid_t | pid |
Additional Inherited Members | |
| Protected Attributes inherited from Base::Process | |
| bool | noConsoleWindow |
| bool | isRunning |
| IO::URI | exePath |
| IO::URI | workingDir |
| Util::String | args |
| Ptr< IO::Stream > | stdoutCaptureStream |
| Ptr< IO::Stream > | stderrCaptureStream |
| Posix::PosixProcess::PosixProcess | ( | ) |
constructor
|
virtual |
Detect if an instance of the process is already running.
Implements Base::Process.
|
static |
Detect if an instance of a given process is running.
|
private |
cleanup all pipes
|
virtual |
Gets the state of application. Call this per frame.
Gets the state of the application.
Implements Base::Process.
|
virtual |
launch application (returns immediately)
Launch the application process and returns immediately.
The state of the launched process can be checked by calling IsRunning().
Implements Base::Process.
|
virtual |
launch application and wait for its termination
Implements Base::Process.
|
virtual |
Read data from the captured stdout and writes it to the stream.
Reads all arrived data from stdout since the last call of this method and puts it to the stream.
Implements Base::Process.
|
private |
|
private |
|
private |
|
private |