Nebula
Loading...
Searching...
No Matches
Base::Process Class Referenceabstract

#include <processbase.h>

Detailed Description

Base class for launching an external application.

Inherited by Posix::PosixProcess, and Win32::Win32Process.

Public Member Functions

 Process ()
 constructor
 
void SetExecutable (const IO::URI &uri)
 set the executable path
 
void SetWorkingDirectory (const IO::URI &uri)
 set working directory
 
void SetArguments (const Util::String &args)
 set command line arguments
 
void SetNoConsoleWindow (bool b)
 do not open a console window for the new process
 
void SetStdoutCaptureStream (const Ptr< IO::Stream > &stream)
 set optional stdout capture stream
 
const Ptr< IO::Stream > & GetStdoutCaptureStream () const
 get optional pointer to stdout capture stream
 
void SetStderrCaptureStream (const Ptr< IO::Stream > &stream)
 set optional stderr capture stream
 
const Ptr< IO::Stream > & GetStderrCaptureStream () const
 get optional pointer to stderr capture stream
 
virtual bool LaunchWait () const =0
 launch application and wait for its termination
 
virtual bool Launch ()=0
 launch application (returns immediately)
 
virtual bool IsRunning ()=0
 Gets the state of application. Call this per frame.
 
virtual void UpdateStdoutStream ()=0
 Read data from the captured stdout and writes it to the stream.
 
virtual bool CheckIfExists ()=0
 Detect if an instance of the process is already running.
 

Protected Attributes

bool noConsoleWindow
 
bool isRunning
 
IO::URI exePath
 
IO::URI workingDir
 
Util::String args
 
Ptr< IO::StreamstdoutCaptureStream
 
Ptr< IO::StreamstderrCaptureStream
 

Constructor & Destructor Documentation

◆ Process()

Base::Process::Process ( )
inline

constructor

Member Function Documentation

◆ CheckIfExists()

virtual bool Base::Process::CheckIfExists ( )
pure virtual

Detect if an instance of the process is already running.

Implemented in Posix::PosixProcess, and Win32::Win32Process.

◆ GetStderrCaptureStream()

const Ptr< IO::Stream > & Base::Process::GetStderrCaptureStream ( ) const
inline

get optional pointer to stderr capture stream

◆ GetStdoutCaptureStream()

const Ptr< IO::Stream > & Base::Process::GetStdoutCaptureStream ( ) const
inline

get optional pointer to stdout capture stream

◆ IsRunning()

virtual bool Base::Process::IsRunning ( )
pure virtual

Gets the state of application. Call this per frame.

Implemented in Posix::PosixProcess, and Win32::Win32Process.

◆ Launch()

virtual bool Base::Process::Launch ( )
pure virtual

launch application (returns immediately)

Implemented in Posix::PosixProcess, and Win32::Win32Process.

◆ LaunchWait()

virtual bool Base::Process::LaunchWait ( ) const
pure virtual

launch application and wait for its termination

Implemented in Posix::PosixProcess, and Win32::Win32Process.

◆ SetArguments()

void Base::Process::SetArguments ( const Util::String & args)
inline

set command line arguments

◆ SetExecutable()

void Base::Process::SetExecutable ( const IO::URI & uri)
inline

set the executable path

◆ SetNoConsoleWindow()

void Base::Process::SetNoConsoleWindow ( bool b)
inline

do not open a console window for the new process

◆ SetStderrCaptureStream()

void Base::Process::SetStderrCaptureStream ( const Ptr< IO::Stream > & stream)
inline

set optional stderr capture stream

◆ SetStdoutCaptureStream()

void Base::Process::SetStdoutCaptureStream ( const Ptr< IO::Stream > & stream)
inline

set optional stdout capture stream

◆ SetWorkingDirectory()

void Base::Process::SetWorkingDirectory ( const IO::URI & uri)
inline

set working directory

◆ UpdateStdoutStream()

virtual void Base::Process::UpdateStdoutStream ( )
pure virtual

Read data from the captured stdout and writes it to the stream.

Implemented in Posix::PosixProcess, and Win32::Win32Process.

Member Data Documentation

◆ args

Util::String Base::Process::args
protected

◆ exePath

IO::URI Base::Process::exePath
protected

◆ isRunning

bool Base::Process::isRunning
protected

◆ noConsoleWindow

bool Base::Process::noConsoleWindow
protected

◆ stderrCaptureStream

Ptr<IO::Stream> Base::Process::stderrCaptureStream
protected

◆ stdoutCaptureStream

Ptr<IO::Stream> Base::Process::stdoutCaptureStream
protected

◆ workingDir

IO::URI Base::Process::workingDir
protected

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