![]() |
Zen
A cross-platform functional programming language
|
Intrinsic process type. More...
#include <zbl.hpp>
Public Member Functions | |
| process (const bool &log, z::stream &ss) | |
| Default constructor. | |
| void | addArg (const z::string &arg) |
| Add command line argument for the process. | |
| void | setWorkingDirectory (const z::string &pwd) |
| Set CWD for process. | |
| z::string | getWorkingDirectory () const |
| Get CWD. | |
| int | execute (const z::string &prog) |
| Run the process and write output the output stream. | |
Private Member Functions | |
| void | write (bool error) |
| Write data to output stream. | |
Private Attributes | |
| QStringList | _qargs |
| Argument list. | |
| bool | _log |
| True if output should be written to stream. | |
| z::stream & | _ss |
| Output log. | |
| QProcess | _p |
| The value. | |
Intrinsic process type.
Default constructor.
| log | True if logging is required |
| ss | Log target for output messages |
| void addArg | ( | const z::string & | arg | ) | [inline] |
Add command line argument for the process.
| arg | The argument |
| int execute | ( | const z::string & | prog | ) | [inline] |
Run the process and write output the output stream.
| prog | The program to execute |
| z::string getWorkingDirectory | ( | ) | const [inline] |
Get CWD.
| void setWorkingDirectory | ( | const z::string & | pwd | ) | [inline] |
Set CWD for process.
| pwd | The directory |