VCF::ProcessWithRedirectedIO Class Reference
This class represents a process that has it's IO redirected so that when there is new data available an event is fired to any registered event handlers. More...
#include <vcf/FoundationKit/ProcessWithRedirectedIO.h>
Inheritance diagram for VCF::ProcessWithRedirectedIO:

Public Member Functions | |
| ProcessWithRedirectedIO () | |
| Constructs a ProcessWithRedirectedIO. | |
| ProcessWithRedirectedIO (const String &processName, const String &arguments) | |
| Constructs a ProcessWithRedirectedIO. | |
| virtual | ~ProcessWithRedirectedIO () |
| int | getID () |
| Returns the ID of the process. | |
| int | getThreadID () |
| returns the processes's main thread ID | |
| bool | createProcess (const String &processName, const String &arguments) |
| creates/runs the process | |
| String | getName () |
| returns the name of the process including any commandline supplied. | |
| ProcessIORedirectionPeer * | getPeer () |
| returns the current peer instance. | |
| void | addOutputReadyHandler (EventHandler *eventHandler) |
| adds a new output ready handler. | |
| void | removeOutputReadyHandler (EventHandler *eventHandler) |
| uint32 | terminate () |
Public Attributes | |
| VCF::Delegate | OutputReady |
Protected Attributes | |
| ProcessIORedirectionPeer * | processPeer_ |
Detailed Description
This class represents a process that has it's IO redirected so that when there is new data available an event is fired to any registered event handlers.Currently only output is captured and redirected. You can register an event handler with the addOutputReadyHandler() method. To start the process either call createProcess() or construct the process and pass in a filename/commandline to the constructor.
Constructor & Destructor Documentation
|
|
Constructs a ProcessWithRedirectedIO. Does NOT actually start the process. |
|
||||||||||||
|
Constructs a ProcessWithRedirectedIO. It will then call the createProcess() with the processName passed in. if createProcess() returns false then an RuntimeException will be thrown |
|
|
|
Member Function Documentation
|
|
adds a new output ready handler. Please note (for at least Win32 implementations, when data is a ready and the the new event is fired, this will happen in the context of a different thread than the one in which the ProcessWithRedirectedIO was created in.
|
|
||||||||||||
|
creates/runs the process
|
|
|
Returns the ID of the process.
|
|
|
returns the name of the process including any commandline supplied.
|
|
|
returns the current peer instance. Should NEVER be NULL as the constructors should throw exceptions if a NULL peer is returned from the SystemToolkit |
|
|
returns the processes's main thread ID
|
|
|
|
|
|
|
Member Data Documentation
|
|
|
|
|
|
The documentation for this class was generated from the following file:
- vcf/FoundationKit/ProcessWithRedirectedIO.h
