Zen
A cross-platform functional programming language

process Class Reference

Intrinsic process type. More...

#include <zbl.hpp>

List of all members.

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.

Detailed Description

Intrinsic process type.


Constructor & Destructor Documentation

process ( const bool &  log,
z::stream ss 
) [inline]

Default constructor.

Parameters:
logTrue if logging is required
ssLog target for output messages

Member Function Documentation

void addArg ( const z::string arg) [inline]

Add command line argument for the process.

Parameters:
argThe argument
int execute ( const z::string prog) [inline]

Run the process and write output the output stream.

Parameters:
progThe program to execute
Returns:
The exit code
z::string getWorkingDirectory ( ) const [inline]

Get CWD.

Returns:
The CWD
void setWorkingDirectory ( const z::string pwd) [inline]

Set CWD for process.

Parameters:
pwdThe directory

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines