![]() |
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/sys/ProcessBuilder.h>
Public Member Functions | |
ProcessBuilder (sys::Path command) | |
void | addArgument (string argument) |
void | add (string argument) |
ProcessBuilder & | operator+ (string argument) |
ProcessBuilder & | operator+= (string argument) |
void | setInput (SystemInStream *_in) |
void | setOutput (SystemOutStream *_out) |
void | setError (SystemOutStream *_out) |
void | setNewSession (bool enabled) |
Process * | run (void) |
This class is used to build a new process by launching a command line.
ProcessBuilder | ( | sys::Path | command | ) |
Construct a process builder.
command | Command to use. Construct a process builder. |
command | Command to use. |
References Vector< T, E, A >::add().
References ProcessBuilder::addArgument().
Add an argument to the command line.
argument | Argument to add. |
References Vector< T, E, A >::add().
Referenced by ProcessBuilder::add(), ProcessBuilder::operator+(), and ProcessBuilder::operator+=().
|
inline |
References ProcessBuilder::addArgument().
|
inline |
References ProcessBuilder::addArgument().
Run the built process.
SystemException | Thrown if there is an error during the build. |
References elm::cerr, String::chars(), Vector< T, E, A >::count(), elm::cout, elm::io::endl, elm::io::err, elm::io::in, StringBuffer::length(), elm::io::out, and StringBuffer::toString().
void setError | ( | SystemOutStream * | _err | ) |
Set the error stream of the built process.
_out | New process error. |
void setInput | ( | SystemInStream * | _in | ) |
Set the input stream of the built process.
_in | New process input. |
If the argument is true, the built process will run in its own session and is separated from the creator process. Practically, this means that the end of the parent process will not cause the end of the child process.
enabled | True to get a new session, false else. |
void setOutput | ( | SystemOutStream * | _out | ) |
Set the output stream of the built process.
_out | New process output. |