Webmaster  |  Imprint 
Platinum
Platinum C++ Framework
Main  |  License  |  Documentation  |  Download  |  Support 

Process Class Reference

Process Environment.

#include <Pt/System/Process.h>

List of all members.

Public Types

enum  State {
  Ready = 0,
  Running = 1,
  Finished = 2,
  Failed = 3
}

Public Member Functions

 Process (const std::string &commandline)
 Constructs a Process with a command including its arguments.
 Process (const ProcessInfo &procInfo)
 Constructs a Process with a process info structure.
 ~Process ()
 Dtor.
const ProcessInfoprocInfo () const
State state () const
void start ()
 Start/Create the Process.
void kill ()
 Kills the Process.
int wait ()
 Waits until the Process ends.

Static Public Member Functions

static void setEnvVar (const std::string &name, const std::string &value)
 Set environment variable.
static void unsetEnvVar (const std::string &name)
 Unset environment variable.
static std::string getEnvVar (const std::string &name)
 Get environment variable.
static void sleep (size_t milliSec)
 Called Process Sleeps milliSec Seconds.
static unsigned long usedMemory ()


Constructor & Destructor Documentation

Process ( const std::string &  commandline  ) 

Parameters:
command Name of the executable along with its arguments


Member Function Documentation

void start (  ) 

Exceptions:
SystemError 

void kill (  ) 

Exceptions:
SystemError 

int wait (  ) 

Exceptions:
SystemError 

static void setEnvVar ( const std::string &  name,
const std::string &  value 
) [static]

Exceptions:
SystemError 

static void unsetEnvVar ( const std::string &  name  )  [static]

Exceptions:
SystemError 

static std::string getEnvVar ( const std::string &  name  )  [static]

Exceptions:
SystemError 

static void sleep ( size_t  milliSec  )  [static]

Exceptions:
SystemError 

Copyright © 2003-2007 The Pt Development Team
Pt 1.0