VMime
childProcess Class Referenceabstract
Inheritance diagram for childProcess:
Collaboration diagram for childProcess:

Public Types

enum  Flags { FLAG_REDIRECT_STDIN = (1 << 0), FLAG_REDIRECT_STDOUT = (1 << 1) }
 

Public Member Functions

virtual ~childProcess ()
 
virtual void start (const std::vector< string > args, const int flags=0)=0
 
virtual shared_ptr
< utility::outputStream
getStdIn ()=0
 
virtual shared_ptr
< utility::inputStream
getStdOut ()=0
 
virtual void waitForFinish ()=0
 

Additional Inherited Members

- Protected Member Functions inherited from object
 object ()
 
 object (const object &)
 
objectoperator= (const object &)
 
virtual ~object ()
 

Detailed Description

Spawn a process and redirect its standard input and/or standard output.

Member Enumeration Documentation

enum Flags

Flags used with start().

Enumerator
FLAG_REDIRECT_STDIN 
FLAG_REDIRECT_STDOUT 

Constructor & Destructor Documentation

virtual ~childProcess ( )
virtual

Member Function Documentation

virtual shared_ptr<utility::outputStream> getStdIn ( )
pure virtual

Return a wrapper to the child process standard input.

Returns
output stream wrapper for child's stdin
virtual shared_ptr<utility::inputStream> getStdOut ( )
pure virtual

Return a wrapper to the child process standard output.

Returns
input stream wrapper for child's stdout
virtual void start ( const std::vector< string args,
const int  flags = 0 
)
pure virtual

Start the child process.

Parameters
argslist of arguments
flagsone or more childProcess::Flags
Exceptions
exceptions::system_errorif the an error occurs before the process can be started
virtual void waitForFinish ( )
pure virtual

Wait for the process to finish.

Exceptions
exceptions::system_errorif the process does not exit normally

The documentation for this class was generated from the following file: