2005/5/9

     
 

class Process

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::lang::Process Class Reference

#include <Process.h>

Inheritance diagram for acdk::lang::Process:

acdk::lang::Object acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

Extern process/executable.

See also:
acdk::cfgscript::ShellExecutor for a more easy to use class for launching external processes.
Author:
Roger Kommer, Wolfgang Jung, Juergen Baumann
Version:
Revision
1.24
Date:
Date
2005/04/09 19:26:49


Public Member Functions

virtual ~Process ()
void destroy ()
RString getCommandLine ()
 return the command line executed

int exitValue ()
 return the exit value

acdk::io::RReader getOutputReader ()
 Process are binary Reader/Writer The encoding of character depends of the started application.

acdk::io::RReader getErrorReader ()
acdk::io::RWriter getInputWriter ()
acdk::io::RReader getErrorStream ()
 alias to getErrorReader

acdk::io::RWriter getInputStream ()
 alias to getInputWriter

acdk::io::RReader getOutputStream ()
 alias to getOutputReader

int waitFor (int timeOutMs=-1)
 wait for ending of the process

bool isRunning ()
void suspend ()
 stop the process

void resume ()
 resume the process


Static Public Member Functions

int getProcessId ()

Protected Member Functions

 Process (IN(RString) command, IN(RString) workdir=Nil)
 Process (IN(RStringArray) cmdarray, IN(RString) workdir=Nil)
 Process (IN(RStringArray) cmdarray, IN(RStringArray) envp, IN(RString) workdir=Nil)
 Process (IN(RString) command, IN(RStringArray) envp, IN(RString) workdir=Nil)

Protected Attributes

int _state

Private Member Functions

virtual void _run ()

Private Attributes

RString _command
RStringArray _args
RStringArray _envp
RString _workDir
RProcess_PipeReader _stderrReader
RProcess_PipeReader _stdoutReader
acdk::io::RFileWriter _stdinWriter
ProcessStatus _status
pid_t _processId
int _exitCode

Friends

class Runtime


Constructor & Destructor Documentation

acdk::lang::Process::Process IN(RString command,
IN(RString workdir = Nil
[protected]
 

acdk::lang::Process::Process IN(RStringArray cmdarray,
IN(RString workdir = Nil
[protected]
 

acdk::lang::Process::Process IN(RStringArray cmdarray,
IN(RStringArray envp,
IN(RString workdir = Nil
[protected]
 

acdk::lang::Process::Process IN(RString command,
IN(RStringArray envp,
IN(RString workdir = Nil
[protected]
 

virtual acdk::lang::Process::~Process  )  [virtual]
 


Member Function Documentation

virtual void acdk::lang::Process::_run  )  [private, virtual]
 

void acdk::lang::Process::destroy  ) 
 

int acdk::lang::Process::exitValue  )  [inline]
 

return the exit value

RString acdk::lang::Process::getCommandLine  ) 
 

return the command line executed

acdk::io::RReader acdk::lang::Process::getErrorReader  )  [inline]
 

See also:
getErrorReader()

acdk::io::RReader acdk::lang::Process::getErrorStream  ) 
 

alias to getErrorReader

acdk::io::RWriter acdk::lang::Process::getInputStream  ) 
 

alias to getInputWriter

acdk::io::RWriter acdk::lang::Process::getInputWriter  )  [inline]
 

See also:
getErrorReader()

acdk::io::RReader acdk::lang::Process::getOutputReader  )  [inline]
 

Process are binary Reader/Writer The encoding of character depends of the started application.

acdk::io::RReader acdk::lang::Process::getOutputStream  ) 
 

alias to getOutputReader

int acdk::lang::Process::getProcessId  )  [static]
 

Returns:
the current os process id

bool acdk::lang::Process::isRunning  ) 
 

Returns:
true if process is still running

void acdk::lang::Process::resume  ) 
 

resume the process

void acdk::lang::Process::suspend  ) 
 

stop the process

int acdk::lang::Process::waitFor int  timeOutMs = -1  ) 
 

wait for ending of the process

Returns:
if process is still running ProcessStillRunning if process already was destroyed ProcessAlreadyDestroyed


Friends And Related Function Documentation

friend class Runtime [friend]
 


Member Data Documentation

RStringArray acdk::lang::Process::_args [private]
 

RString acdk::lang::Process::_command [private]
 

RStringArray acdk::lang::Process::_envp [private]
 

int acdk::lang::Process::_exitCode [private]
 

pid_t acdk::lang::Process::_processId [private]
 

int acdk::lang::Process::_state [protected]
 

ProcessStatus acdk::lang::Process::_status [private]
 

RProcess_PipeReader acdk::lang::Process::_stderrReader [private]
 

acdk::io::RFileWriter acdk::lang::Process::_stdinWriter [private]
 

RProcess_PipeReader acdk::lang::Process::_stdoutReader [private]
 

RString acdk::lang::Process::_workDir [private]