Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MyExecPanel Class Reference

#include <MyExternalCmdExecDialog.h>

Inheritance diagram for MyExecPanel:
Inheritance graph

Public Member Functions

 MyExecPanel (wxWindow *parent)
 
void KillProcess ()
 
void PauseProcess (bool pause=true)
 function to pause running process, argument pause defaults to true - to resume, set it to false More...
 
void ContinueProcess ()
 
long GetPid ()
 
int ExecWithRedirect (wxString command)
 
int ExecQueue (HuginQueue::CommandQueue *queue)
 
void OnTimer (wxTimerEvent &event)
 
void OnProcessTerminated (MyPipedProcess *process, int pid, int status)
 
bool SaveLog (const wxString &filename)
 save the content of the window into a given log file More...
 
void CopyLogToClipboard ()
 copy the content of the log window into the clipboard More...
 
wxArrayString GetLogAsArrayString ()
 returns the output More...
 
void AddString (const wxString &s)
 display the string in the panel More...
 
virtual ~MyExecPanel ()
 
- Public Member Functions inherited from MyProcessListener
virtual ~MyProcessListener ()
 

Private Member Functions

void AddToOutput (wxInputStream &s)
 
void DoAsyncExec (const wxString &cmd)
 
void AddAsyncProcess (MyPipedProcess *process)
 
void RemoveAsyncProcess (MyPipedProcess *process)
 
int ExecNextQueue ()
 execute next command in queue More...
 

Private Attributes

long m_pidLast
 
wxTextCtrl * m_textctrl
 
long m_lastLineStart
 
MyProcessesArray m_running
 
wxTimer m_timerIdleWakeUp
 
HuginQueue::CommandQueuem_queue
 
size_t m_queueLength
 
bool m_checkReturnCode
 
wxExecuteEnv m_executeEnv
 
wxStopWatch m_stopWatch
 

Detailed Description

Definition at line 54 of file MyExternalCmdExecDialog.h.

Constructor & Destructor Documentation

MyExecPanel::MyExecPanel ( wxWindow *  parent)
explicit

Definition at line 78 of file MyExternalCmdExecDialog.cpp.

MyExecPanel::~MyExecPanel ( )
virtual

Definition at line 502 of file MyExternalCmdExecDialog.cpp.

References m_textctrl.

Member Function Documentation

void MyExecPanel::AddAsyncProcess ( MyPipedProcess process)
private

Definition at line 308 of file MyExternalCmdExecDialog.cpp.

References m_running, and m_timerIdleWakeUp.

Referenced by ExecWithRedirect().

void MyExecPanel::AddString ( const wxString &  s)

display the string in the panel

Definition at line 523 of file MyExternalCmdExecDialog.cpp.

References m_lastLineStart, and m_textctrl.

Referenced by MyExecDialog::AddString(), ExecNextQueue(), and RunStitchPanel::StitchProject().

void MyExecPanel::AddToOutput ( wxInputStream &  s)
private

Definition at line 339 of file MyExternalCmdExecDialog.cpp.

References DEBUG_TRACE, m_lastLineStart, and m_textctrl.

Referenced by OnProcessTerminated(), and OnTimer().

void MyExecPanel::ContinueProcess ( )

Definition at line 187 of file MyExternalCmdExecDialog.cpp.

References PauseProcess().

Referenced by RunStitchPanel::ContinueStitch().

void MyExecPanel::CopyLogToClipboard ( )

copy the content of the log window into the clipboard

Definition at line 512 of file MyExternalCmdExecDialog.cpp.

References m_textctrl.

Referenced by RawImportProgress::OnProcessReferenceTerminate(), MyExecDialog::OnProcessTerminate(), and RawImportProgress::OnProcessTerminate().

void MyExecPanel::DoAsyncExec ( const wxString &  cmd)
private
int MyExecPanel::ExecNextQueue ( )
private
int MyExecPanel::ExecQueue ( HuginQueue::CommandQueue queue)
int MyExecPanel::ExecWithRedirect ( wxString  command)
wxArrayString MyExecPanel::GetLogAsArrayString ( )

returns the output

Definition at line 518 of file MyExternalCmdExecDialog.cpp.

References m_textctrl.

Referenced by RawImportProgress::OnProcessReferenceTerminate().

long MyExecPanel::GetPid ( )

Definition at line 192 of file MyExternalCmdExecDialog.cpp.

References m_pidLast.

Referenced by RunStitchPanel::GetPid().

void MyExecPanel::KillProcess ( )
void MyExecPanel::OnProcessTerminated ( MyPipedProcess process,
int  pid,
int  status 
)
virtual
void MyExecPanel::OnTimer ( wxTimerEvent &  event)

Definition at line 399 of file MyExternalCmdExecDialog.cpp.

References AddToOutput(), DEBUG_DEBUG, DEBUG_TRACE, m_pidLast, and m_running.

void MyExecPanel::PauseProcess ( bool  pause = true)

function to pause running process, argument pause defaults to true - to resume, set it to false

Definition at line 125 of file MyExternalCmdExecDialog.cpp.

References m_pidLast.

Referenced by ContinueProcess(), and RunStitchPanel::PauseStitch().

void MyExecPanel::RemoveAsyncProcess ( MyPipedProcess process)
private

Definition at line 323 of file MyExternalCmdExecDialog.cpp.

References m_running, and m_timerIdleWakeUp.

Referenced by OnProcessTerminated().

bool MyExecPanel::SaveLog ( const wxString &  filename)

save the content of the window into a given log file

Returns
true if log was saved successful

Definition at line 507 of file MyExternalCmdExecDialog.cpp.

References m_textctrl.

Referenced by RunStitchPanel::SaveLog().

Member Data Documentation

bool MyExecPanel::m_checkReturnCode
private

Definition at line 112 of file MyExternalCmdExecDialog.h.

Referenced by ExecNextQueue(), and OnProcessTerminated().

wxExecuteEnv MyExecPanel::m_executeEnv
private

Definition at line 113 of file MyExternalCmdExecDialog.h.

Referenced by ExecQueue(), and ExecWithRedirect().

long MyExecPanel::m_lastLineStart
private

Definition at line 102 of file MyExternalCmdExecDialog.h.

Referenced by AddString(), and AddToOutput().

long MyExecPanel::m_pidLast
private
HuginQueue::CommandQueue* MyExecPanel::m_queue
private

Definition at line 109 of file MyExternalCmdExecDialog.h.

Referenced by ExecNextQueue(), ExecQueue(), and OnProcessTerminated().

size_t MyExecPanel::m_queueLength
private

Definition at line 110 of file MyExternalCmdExecDialog.h.

Referenced by ExecNextQueue(), and ExecQueue().

MyProcessesArray MyExecPanel::m_running
private

Definition at line 104 of file MyExternalCmdExecDialog.h.

Referenced by AddAsyncProcess(), OnTimer(), and RemoveAsyncProcess().

wxStopWatch MyExecPanel::m_stopWatch
private

Definition at line 114 of file MyExternalCmdExecDialog.h.

Referenced by ExecQueue(), and OnProcessTerminated().

wxTextCtrl* MyExecPanel::m_textctrl
private
wxTimer MyExecPanel::m_timerIdleWakeUp
private

Definition at line 107 of file MyExternalCmdExecDialog.h.

Referenced by AddAsyncProcess(), and RemoveAsyncProcess().


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