C++ common classes
General purpose classes for use across projects (Apache license)
ExecuteShell Class Reference

#include <executeshell.h>

List of all members.

Public Member Functions

 ExecuteShell ()
virtual ~ExecuteShell ()

Static Public Member Functions

static int Execute (const char *szCommand, string &sStdout, string *sStderr=NULL, const char *strForkExit=NULL)
static const char * FindBinary (const char *pName)
 Find a command on the machine.
static void WriteStdout (bool bNewline=true)
 Write to standard out.

Static Public Attributes

static char szStdOut [ESHELL_FORMAT_SIZE]

Detailed Description

Definition at line 26 of file executeshell.h.


Constructor & Destructor Documentation

Definition at line 27 of file executeshell.cpp.

Definition at line 32 of file executeshell.cpp.


Member Function Documentation

int ExecuteShell::Execute ( const char *  szCommand,
string &  sStdout,
string *  sStderr = NULL,
const char *  strForkExit = NULL 
) [static]

Execute command,return stdout in a string buffer strForkExit is set if the command will fork. When Execute sees the string it will return. Otherwise, stdout doesn't close until all forked processes close.

Definition at line 39 of file executeshell.cpp.

const char * ExecuteShell::FindBinary ( const char *  pName) [static]

Find a command on the machine.

Definition at line 133 of file executeshell.cpp.

void ExecuteShell::WriteStdout ( bool  bNewline = true) [static]

Write to standard out.

Definition at line 170 of file executeshell.cpp.


Member Data Documentation

char ExecuteShell::szStdOut [static]

Definition at line 43 of file executeshell.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines