Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

SystemCmd Class Reference

#include <SystemCmd.h>

Inheritance diagram for SystemCmd:

InterCmd List of all members.

Public Member Functions

 SystemCmd (const char *Command_Cv, bool UseTmp_bv=false, SpecialTreatment=ST_NONE)
 SystemCmd (bool UseTmp_bv=false, SpecialTreatment=ST_NONE)
virtual ~SystemCmd ()
int Execute (string Command_Cv)
int ExecuteBackground (string Command_Cv)
void SetOutputHandler (void(*Handle_f)(void *, string, bool), void *Par_p)
int Select (string Reg_Cv, bool Invert_bv=false, unsigned Idx_ii=IDX_STDOUT)
const string * GetString (unsigned Idx_ii=IDX_STDOUT)
const string * GetLine (unsigned Num_iv, bool Selected_bv=false, unsigned Idx_ii=IDX_STDOUT)
int NumLines (bool Selected_bv=false, unsigned Idx_ii=IDX_STDOUT)
void SetCombine (const bool Combine_b=true)
void AppendTo (string File_Cv, unsigned Idx_ii=IDX_STDOUT)
int Retcode ()
string GetFilename (unsigned Idx_ii=IDX_STDOUT)
int GetStdout (vector< string > &Ret_Cr, const bool Append_bv=false)
int GetStderr (vector< string > &Ret_Cr, const bool Append_bv=false)

Protected Member Functions

int PlaceOutput (unsigned Which_iv, vector< string > &Ret_Cr, const bool Append_bv)
void Invalidate ()
void InitFile ()
void OpenFiles ()
int DoExecute (string Cmd_Cv)
bool DoWait (bool Hang_bv, int &Ret_ir)
void InitCmd (string CmdIn_rv, string &CmdRedir_Cr)
void CheckOutput ()
void GetUntilEOF (ifstream &File_Cr, vector< string > &Lines_Cr, bool &NewLineSeen_br, bool Stderr_bv)
void ExtractNewline (char *Buf_ti, int Cnt_ii, bool &NewLineSeen_br, string &Text_Cr, vector< string > &Lines_Cr)
void AddLine (string Text_Cv, vector< string > &Lines_Cr)

Protected Attributes

string FileName_aC [2]
string Text_aC [2]
bool Valid_ab [2]
ifstream File_aC [2]
vector< string > Lines_aC [2]
vector< string * > SelLines_aC [2]
bool Append_ab [2]
bool NewLineSeen_ab [2]
bool Combine_b
bool UseTmp_b
bool Background_b
int Ret_i
int Pid_i
SpecialTreatment Spec_e
void(* OutputHandler_f )(void *, string, bool)
void * HandlerPar_p

Static Protected Attributes

int Nr_i = 0

Constructor & Destructor Documentation

SystemCmd::SystemCmd const char *  Command_Cv,
bool  UseTmp_bv = false,
SpecialTreatment  = ST_NONE
 

SystemCmd::SystemCmd bool  UseTmp_bv = false,
SpecialTreatment  = ST_NONE
 

SystemCmd::~SystemCmd  )  [virtual]
 


Member Function Documentation

void SystemCmd::AddLine string  Text_Cv,
vector< string > &  Lines_Cr
[protected]
 

void SystemCmd::AppendTo string  File_Cv,
unsigned  Idx_ii = IDX_STDOUT
 

void SystemCmd::CheckOutput  )  [protected]
 

int SystemCmd::DoExecute string  Cmd_Cv  )  [protected]
 

bool SystemCmd::DoWait bool  Hang_bv,
int &  Ret_ir
[protected]
 

int SystemCmd::Execute string  Command_Cv  ) 
 

Reimplemented in InterCmd.

int SystemCmd::ExecuteBackground string  Command_Cv  ) 
 

void SystemCmd::ExtractNewline char *  Buf_ti,
int  Cnt_ii,
bool &  NewLineSeen_br,
string &  Text_Cr,
vector< string > &  Lines_Cr
[protected]
 

string SystemCmd::GetFilename unsigned  Idx_ii = IDX_STDOUT  ) 
 

const string * SystemCmd::GetLine unsigned  Num_iv,
bool  Selected_bv = false,
unsigned  Idx_ii = IDX_STDOUT
 

int SystemCmd::GetStderr vector< string > &  Ret_Cr,
const bool  Append_bv = false
[inline]
 

int SystemCmd::GetStdout vector< string > &  Ret_Cr,
const bool  Append_bv = false
[inline]
 

const string * SystemCmd::GetString unsigned  Idx_ii = IDX_STDOUT  ) 
 

void SystemCmd::GetUntilEOF ifstream &  File_Cr,
vector< string > &  Lines_Cr,
bool &  NewLineSeen_br,
bool  Stderr_bv
[protected]
 

void SystemCmd::InitCmd string  CmdIn_rv,
string &  CmdRedir_Cr
[protected]
 

void SystemCmd::InitFile  )  [protected]
 

void SystemCmd::Invalidate  )  [protected]
 

int SystemCmd::NumLines bool  Selected_bv = false,
unsigned  Idx_ii = IDX_STDOUT
 

void SystemCmd::OpenFiles  )  [protected]
 

int SystemCmd::PlaceOutput unsigned  Which_iv,
vector< string > &  Ret_Cr,
const bool  Append_bv
[protected]
 

int SystemCmd::Retcode  )  [inline]
 

int SystemCmd::Select string  Reg_Cv,
bool  Invert_bv = false,
unsigned  Idx_ii = IDX_STDOUT
 

void SystemCmd::SetCombine const bool  Combine_b = true  ) 
 

void SystemCmd::SetOutputHandler void(*  Handle_f)(void *, string, bool),
void *  Par_p
 


Member Data Documentation

bool SystemCmd::Append_ab[2] [protected]
 

bool SystemCmd::Background_b [protected]
 

bool SystemCmd::Combine_b [protected]
 

ifstream SystemCmd::File_aC[2] [protected]
 

string SystemCmd::FileName_aC[2] [protected]
 

void* SystemCmd::HandlerPar_p [protected]
 

vector<string> SystemCmd::Lines_aC[2] [protected]
 

bool SystemCmd::NewLineSeen_ab[2] [protected]
 

int SystemCmd::Nr_i = 0 [static, protected]
 

void(* SystemCmd::OutputHandler_f)( void*, string, bool ) [protected]
 

int SystemCmd::Pid_i [protected]
 

int SystemCmd::Ret_i [protected]
 

vector<string*> SystemCmd::SelLines_aC[2] [protected]
 

SpecialTreatment SystemCmd::Spec_e [protected]
 

string SystemCmd::Text_aC[2] [protected]
 

bool SystemCmd::UseTmp_b [protected]
 

bool SystemCmd::Valid_ab[2] [protected]
 


The documentation for this class was generated from the following files:
Generated on Tue Jul 17 04:35:15 2007 for yast2-storage by doxygen 1.3.6