artefaktur
software engineer &        architecture

 
 
 
 

class ShellExecutor

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

acdk::cfgscript::ShellExecutor Class Reference

#include <ShellExecutor.h>

Inheritance diagram for acdk::cfgscript::ShellExecutor:

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

Detailed Description

General class to execute external programs.


Public Member Functions

 ShellExecutor (IN(RString) cmdline, int flags, IN(RStringArray) env=Nil)
void setCommandLine (IN(RString) cmdline)
void setWorkingDir (IN(RString) wdir)
 set the working directory where to execute the program If it is not set uses the working directory of the parent process

virtual bool execute (IN(RProps) props)
 run the external programm

RString getOutString ()
 after returning from execute() this method returns the standard output of the executable

RString getErrString ()
 after returning from execute() this method returns the error output of the executable

void setOutWriter (IN(::acdk::io::RCharWriter) outWriter)
 Set the writer, where to write the standard output By default the output will be collected in a string which can be retrived via getOutString().

void setErrWriter (IN(::acdk::io::RCharWriter) errWriter)
 Set the writer, where to write the standard output By default the output will be collected in a string which can be retrived via getOutString().

int getTimeout ()
 see _timeOut

void setTimeOut (int timeOut)
 see _timeOut

void evaluateOptions (IN(RProps) props)

Static Public Member Functions

RString getShell (IN(RProps) props)
RString getShellExecuteOpt (IN(RProps) props)

Private Attributes

RString _cmdline
int _flags
RStringArray _env
RString _workDir
RString _outs
RString _errs
::acdk::io::RCharWriter _outWriter
::acdk::io::RCharWriter _errWriter
int _timeOut
 timeout in ms waiting for process by default -1, wait forever


Constructor & Destructor Documentation

acdk::cfgscript::ShellExecutor::ShellExecutor IN(RString cmdline,
int  flags,
IN(RStringArray env = Nil
[inline]
 

Parameters:
the command line for the external programm to execute
flags a combination of ShellExecuteFlags
env Environment to use

Member Function Documentation

void acdk::cfgscript::ShellExecutor::evaluateOptions IN(RProps props  ) 
 

virtual bool acdk::cfgscript::ShellExecutor::execute IN(RProps props  )  [virtual]
 

run the external programm

RString acdk::cfgscript::ShellExecutor::getErrString  )  [inline]
 

after returning from execute() this method returns the error output of the executable

RString acdk::cfgscript::ShellExecutor::getOutString  )  [inline]
 

after returning from execute() this method returns the standard output of the executable

RString acdk::cfgscript::ShellExecutor::getShell IN(RProps props  )  [static]
 

RString acdk::cfgscript::ShellExecutor::getShellExecuteOpt IN(RProps props  )  [static]
 

int acdk::cfgscript::ShellExecutor::getTimeout  )  [inline]
 

see _timeOut

void acdk::cfgscript::ShellExecutor::setCommandLine IN(RString cmdline  )  [inline]
 

void acdk::cfgscript::ShellExecutor::setErrWriter IN(::acdk::io::RCharWriter errWriter  )  [inline]
 

Set the writer, where to write the standard output By default the output will be collected in a string which can be retrived via getOutString().

void acdk::cfgscript::ShellExecutor::setOutWriter IN(::acdk::io::RCharWriter outWriter  )  [inline]
 

Set the writer, where to write the standard output By default the output will be collected in a string which can be retrived via getOutString().

void acdk::cfgscript::ShellExecutor::setTimeOut int  timeOut  )  [inline]
 

see _timeOut

void acdk::cfgscript::ShellExecutor::setWorkingDir IN(RString wdir  )  [inline]
 

set the working directory where to execute the program If it is not set uses the working directory of the parent process


Member Data Documentation

RString acdk::cfgscript::ShellExecutor::_cmdline [private]
 

RStringArray acdk::cfgscript::ShellExecutor::_env [private]
 

RString acdk::cfgscript::ShellExecutor::_errs [private]
 

::acdk::io::RCharWriter acdk::cfgscript::ShellExecutor::_errWriter [private]
 

int acdk::cfgscript::ShellExecutor::_flags [private]
 

RString acdk::cfgscript::ShellExecutor::_outs [private]
 

::acdk::io::RCharWriter acdk::cfgscript::ShellExecutor::_outWriter [private]
 

int acdk::cfgscript::ShellExecutor::_timeOut [private]
 

timeout in ms waiting for process by default -1, wait forever

RString acdk::cfgscript::ShellExecutor::_workDir [private]
 

 
Last modified 2005-05-08 18:31 by SYSTEM By Artefaktur, Ing. Bureau Kommer