#include <Batch.h>
Public Member Functions | |
| Batch (wxFrame *parent, wxString path, bool bgui) | |
| Main constructor. | |
| void | AddAppToBatch (wxString app) |
| Adds an application entry in the batch list. | |
| void | AddProjectToBatch (wxString projectFile, wxString outputFile=_T(""), Project::Target target=Project::STITCHING) |
| Adds a project entry in the batch list. | |
| bool | AllDone () |
| Returns true if there are no more projects pending execution. | |
| void | AppendBatchFile (wxString file) |
| Appends projects from file to batch list. | |
| void | CancelBatch () |
| Stops batch run, failing projects in progress. | |
| void | CancelProject (int index) |
| Cancels project at index in batch, failing it. | |
| void | ChangePrefix (int index, wxString newPrefix) |
| Changes output prefix for project at index. | |
| bool | CheckProjectExistence () |
| Called internally in console mode. | |
| int | ClearBatch () |
| Clears batch list and returns 0 if succesful. | |
| bool | CompareProjectsInLists (int stitchListIndex, int batchListIndex) |
| Compares two project at indexes in both lists and returns true if they have identical project ids. | |
| int | GetFirstAvailable () |
| Returns index of first waiting project in batch. | |
| int | GetIndex (int id) |
| Returns index of project with selected id. | |
| Project * | GetProject (int index) |
| Returns project at index. | |
| int | GetProjectCount () |
| Returns number of projects in batch list. | |
| int | GetProjectCountByPath (wxString path) |
| Returns number of projects in batch list with the input file path. | |
| int | GetRunningCount () |
| Returns number of projects currently in progress. | |
| Project::Status | GetStatus (int index) |
| Returns current status of project at index. | |
| bool | IsRunning () |
| return true, if batch is running | |
| bool | IsPaused () |
| Returns true if batch execution is currently paused. | |
| const wxString | GetLastFile () |
| Returns last saved batch file. | |
| wxDateTime | GetLastFileDate () |
| void | ListBatch () |
| Used in console mode. | |
| int | LoadBatchFile (wxString file) |
| Clears current batch list and loads projects from batch file. | |
| int | LoadTemp () |
| Loads temporary batch file. | |
| bool | NoErrors () |
| Returns true if there are no failed projects in batch. | |
| void | OnProcessTerminate (wxProcessEvent &event) |
| Called internally when all running processes have completed and need to be removed from running list. | |
| bool | OnStitch (wxString scriptFile, wxString outname, int id) |
| Called to start stitch of project with input scriptFile. | |
| bool | OnDetect (wxString scriptFile, int id) |
| called to start detecting | |
| void | PauseBatch () |
| Pauses and continues batch execution. | |
| void | RemoveProject (int id) |
| Removes project with id from batch list. | |
| void | RemoveProjectAtIndex (int selIndex) |
| Removes project at index from batch list. | |
| void | RunBatch () |
| Starts batch execution. | |
| void | RunNextInBatch () |
| Starts execution of next waiting project in batch. | |
| void | SaveBatchFile (wxString file) |
| Saves batch list to file. | |
| void | SaveTemp () |
| Saves batch list to temporary file. | |
| void | SetStatus (int index, Project::Status status) |
| Used internally to set status of selected project. | |
| void | SwapProject (int index) |
| Swaps position in batch of project at index with project at index+1. | |
| void | ShowOutput (bool isVisible=true) |
| Set visibility of all running projects. | |
| size_t | GetFailedProjectsCount () |
| returns number of failed projects | |
| wxString | GetFailedProjectName (unsigned int i) |
| returns project file name of failed project with index i | |
| wxString | GetFailedProjectLog (unsigned int i) |
| returns log file name of failed project with index i | |
Public Attributes | |
| bool | parallel |
| bool | deleteFiles |
| bool | shutdown |
| bool | overwrite |
| bool | verbose |
| bool | autostitch |
| bool | autoremove |
| bool | saveLog |
| bool | gui |
Private Attributes | |
| wxConfigBase * | m_config |
| ProjectArray | m_projList |
| FrameArray | m_stitchFrames |
| wxString | m_lastFile |
| wxDateTime | m_lastmod |
| bool | m_cancelled |
| bool | m_paused |
| bool | m_running |
| bool | m_clearedInProgress |
| std::vector< FailedProject > | m_failedProjects |
| PTPrograms | progs |
| AssistantPrograms | progsAss |
|
||||||||||||||||
|
Main constructor.
Definition at line 44 of file Batch.cpp. References getAssistantProgramsConfig(), getExePath(), getPTProgramsConfig(), and makefile::path. |
|
|
Adds an application entry in the batch list.
Definition at line 83 of file Batch.cpp. References m_projList. Referenced by BatchFrame::OnButtonAddCommand(). |
|
||||||||||||||||
|
Adds a project entry in the batch list.
Definition at line 89 of file Batch.cpp. References m_projList. Referenced by BatchFrame::AddDirToList(), BatchFrame::AddToList(), AppendBatchFile(), HostApp::OnInit(), and OnProcessTerminate(). |
|
|
Returns true if there are no more projects pending execution.
Definition at line 109 of file Batch.cpp. References m_projList. Referenced by HostApp::OnInit(), OnProcessTerminate(), and RunNextInBatch(). |
|
|
Appends projects from file to batch list.
Definition at line 123 of file Batch.cpp. References AddProjectToBatch(), m_lastFile, m_lastmod, and m_projList. Referenced by LoadBatchFile(), and LoadTemp(). |
|
|
Stops batch run, failing projects in progress.
Definition at line 174 of file Batch.cpp. References CancelProject(), GetRunningCount(), m_cancelled, and m_running. Referenced by ClearBatch(), and BatchFrame::OnButtonCancel(). |
|
|
Cancels project at index in batch, failing it.
Definition at line 183 of file Batch.cpp. References GetRunningCount(), m_paused, m_running, and m_stitchFrames. Referenced by CancelBatch(), and BatchFrame::OnButtonSkip(). |
|
||||||||||||
|
Changes output prefix for project at index.
Definition at line 196 of file Batch.cpp. References m_projList. Referenced by BatchFrame::ChangePrefix(). |
|
|
Called internally in console mode. Waits for running projects to complete and then runs next in batch Definition at line 201 of file Batch.cpp. References GetIndex(), GetStatus(), m_stitchFrames, OnProcessTerminate(), and SetStatus(). Referenced by RunNextInBatch(). |
|
|
Clears batch list and returns 0 if succesful.
Definition at line 264 of file Batch.cpp. References CancelBatch(), cout, m_clearedInProgress, m_projList, and m_stitchFrames. Referenced by LoadBatchFile(), BatchFrame::OnButtonClear(), HostApp::OnInit(), and BatchFrame::OnReloadBatch(). |
|
||||||||||||
|
Compares two project at indexes in both lists and returns true if they have identical project ids.
Definition at line 319 of file Batch.cpp. References m_projList, and m_stitchFrames. Referenced by BatchFrame::OnButtonSkip(). |
|
|
returns log file name of failed project with index i
Definition at line 1188 of file Batch.cpp. References m_failedProjects. Referenced by FailedProjectsDialog::OnSelectProject(). |
|
|
returns project file name of failed project with index i
Definition at line 1176 of file Batch.cpp. References m_failedProjects. |
|
|
returns number of failed projects
Definition at line 151 of file Batch.h. References m_failedProjects. Referenced by BatchFrame::OnBatchFailed(). |
|
|
Returns index of first waiting project in batch.
Definition at line 324 of file Batch.cpp. References m_projList. Referenced by RunNextInBatch(). |
|
|
Returns index of project with selected id.
Definition at line 349 of file Batch.cpp. References m_projList. Referenced by CheckProjectExistence(), OnProcessTerminate(), and RemoveProject(). |
|
|
Returns last saved batch file.
Definition at line 106 of file Batch.h. Referenced by BatchFrame::Entry(). |
|
|
Definition at line 110 of file Batch.h. Referenced by BatchFrame::Entry(). |
|
|
Returns project at index.
Definition at line 361 of file Batch.cpp. References m_projList. Referenced by BatchFrame::AddDirToList(), BatchFrame::AddToList(), ProjectListBox::ChangePrefix(), ProjectListBox::Fill(), ProjectListBox::GetSelectedProjectTarget(), BatchFrame::OnButtonAddCommand(), and BatchFrame::OnUpdateListBox(). |
|
|
Returns number of projects in batch list.
Definition at line 366 of file Batch.cpp. References m_projList. Referenced by BatchFrame::AddDirToList(), BatchFrame::AddToList(), BatchFrame::ChangePrefix(), ProjectListBox::Fill(), BatchFrame::OnButtonAddCommand(), HostApp::OnInit(), and BatchFrame::OnUpdateListBox(). |
|
|
Returns number of projects in batch list with the input file path.
Definition at line 371 of file Batch.cpp. References m_projList, and makefile::path. |
|
|
Returns number of projects currently in progress.
Definition at line 384 of file Batch.cpp. References m_stitchFrames. Referenced by CancelBatch(), CancelProject(), BatchFrame::OnButtonPause(), BatchFrame::OnButtonResetAll(), BatchFrame::OnButtonSkip(), BatchFrame::OnProcessTerminate(), OnProcessTerminate(), and PauseBatch(). |
|
|
Returns current status of project at index.
Definition at line 389 of file Batch.cpp. References cout, m_projList, and Project::status. Referenced by CheckProjectExistence(), BatchFrame::OnButtonRemoveComplete(), BatchFrame::OnButtonRemoveFromList(), BatchFrame::OnButtonReset(), BatchFrame::OnButtonSkip(), and BatchFrame::OnUpdateListBox(). |
|
|
Returns true if batch execution is currently paused.
Definition at line 411 of file Batch.cpp. Referenced by BatchFrame::IsPaused(), BatchFrame::OnButtonPause(), and BatchFrame::OnButtonRunBatch(). |
|
|
return true, if batch is running
Definition at line 406 of file Batch.cpp. Referenced by BatchFrame::IsRunning(). |
|
|
Used in console mode. Prints out all projects and their statuses to the console Definition at line 416 of file Batch.cpp. References cout, Project::GetStatusText(), Project::id, m_projList, Project::path, and Project::prefix. Referenced by HostApp::OnInit(). |
|
|
Clears current batch list and loads projects from batch file.
Definition at line 435 of file Batch.cpp. References AppendBatchFile(), ClearBatch(), and cout. Referenced by BatchFrame::OnButtonOpenBatch(). |
|
|
Loads temporary batch file.
Definition at line 459 of file Batch.cpp. References AppendBatchFile(), cout, and verbose. Referenced by HostApp::OnInit(), and BatchFrame::OnReloadBatch(). |
|
|
Returns true if there are no failed projects in batch.
Definition at line 501 of file Batch.cpp. References m_projList. Referenced by BatchFrame::OnButtonRemoveComplete(), and OnProcessTerminate(). |
|
||||||||||||
|
called to start detecting
Definition at line 804 of file Batch.cpp. References cout, RunStitchFrame::DetectProject(), m_stitchFrames, progsAss, RunStitchFrame::SetProjectId(), and verbose. Referenced by RunNextInBatch(). |
|
|
Called internally when all running processes have completed and need to be removed from running list.
Definition at line 513 of file Batch.cpp. References AddProjectToBatch(), AllDone(), autostitch, cout, GetIndex(), GetRunningCount(), gui, FailedProject::logfile, m_cancelled, m_clearedInProgress, m_failedProjects, m_paused, m_projList, m_running, m_stitchFrames, NoErrors(), FailedProject::project, RemoveProjectAtIndex(), RunNextInBatch(), saveLog, SaveTemp(), and Project::status. Referenced by CheckProjectExistence(). |
|
||||||||||||||||
|
Called to start stitch of project with input scriptFile.
Definition at line 720 of file Batch.cpp. References cout, m_stitchFrames, RunStitchFrame::m_stitchPanel, progs, RunStitchPanel::SetOverwrite(), RunStitchFrame::SetProjectId(), RunStitchFrame::StitchProject(), and verbose. Referenced by RunNextInBatch(). |
|
|
Pauses and continues batch execution.
Definition at line 835 of file Batch.cpp. References RunStitchPanel::ContinueStitch(), GetRunningCount(), m_paused, m_projList, m_stitchFrames, RunStitchFrame::m_stitchPanel, and RunStitchPanel::PauseStitch(). Referenced by BatchFrame::OnButtonPause(). |
|
|
Removes project with id from batch list.
Definition at line 869 of file Batch.cpp. References cout, GetIndex(), and RemoveProjectAtIndex(). Referenced by HostApp::OnInit(). |
|
|
Removes project at index from batch list.
Definition at line 886 of file Batch.cpp. References cout, deleteFiles, and m_projList. Referenced by BatchFrame::OnButtonRemoveComplete(), BatchFrame::OnButtonRemoveFromList(), OnProcessTerminate(), and RemoveProject(). |
|
|
Starts batch execution.
Definition at line 916 of file Batch.cpp. References cout, gui, m_failedProjects, m_projList, m_running, and RunNextInBatch(). Referenced by HostApp::OnInit(), and BatchFrame::RunBatch(). |
|
|
Starts execution of next waiting project in batch.
Definition at line 942 of file Batch.cpp. References AllDone(), CheckProjectExistence(), cout, GetFirstAvailable(), m_projList, m_running, m_stitchFrames, OnDetect(), OnStitch(), RunStitchFrame::SetProcessId(), and RunStitchFrame::SetProjectId(). Referenced by OnProcessTerminate(), and RunBatch(). |
|
|
Saves batch list to file.
Definition at line 1072 of file Batch.cpp. References m_lastFile, m_lastmod, and m_projList. Referenced by BatchFrame::OnButtonSaveBatch(), and SaveTemp(). |
|
|
Saves batch list to temporary file.
Definition at line 1117 of file Batch.cpp. References cout, SaveBatchFile(), and verbose. Referenced by BatchFrame::AddDirToList(), BatchFrame::AddToList(), BatchFrame::OnButtonAddCommand(), BatchFrame::OnButtonAddToAssistantQueue(), BatchFrame::OnButtonAddToStitchingQueue(), BatchFrame::OnButtonChangePrefix(), BatchFrame::OnButtonClear(), BatchFrame::OnButtonMoveDown(), BatchFrame::OnButtonMoveUp(), BatchFrame::OnButtonOpenBatch(), BatchFrame::OnButtonRemoveComplete(), BatchFrame::OnButtonRemoveFromList(), BatchFrame::OnButtonReset(), BatchFrame::OnButtonResetAll(), HostApp::OnInit(), OnProcessTerminate(), and BatchFrame::OnUpdateListBox(). |
|
||||||||||||
|
Used internally to set status of selected project.
Definition at line 1146 of file Batch.cpp. References cout, and m_projList. Referenced by CheckProjectExistence(), BatchFrame::OnButtonReset(), BatchFrame::OnButtonResetAll(), BatchFrame::OnButtonSkip(), HostApp::OnInit(), and BatchFrame::OnUpdateListBox(). |
|
|
Set visibility of all running projects.
Definition at line 1168 of file Batch.cpp. References m_stitchFrames. Referenced by BatchFrame::OnCheckVerbose(), BatchFrame::OnMinimize(), and BatchFrame::UpdateBatchVerboseStatus(). |
|
|
Swaps position in batch of project at index with project at index+1.
Definition at line 1162 of file Batch.cpp. References m_projList. Referenced by BatchFrame::SwapProject(). |
|
|
Definition at line 60 of file Batch.h. Referenced by BatchFrame::OnCheckAutoRemove(), and BatchFrame::PropagateDefaults(). |
|
|
Definition at line 59 of file Batch.h. Referenced by BatchFrame::OnCheckAutoStitch(), OnProcessTerminate(), and BatchFrame::PropagateDefaults(). |
|
|
Definition at line 55 of file Batch.h. Referenced by HostApp::OnInit(), and RemoveProjectAtIndex(). |
|
|
Definition at line 62 of file Batch.h. Referenced by OnProcessTerminate(), and RunBatch(). |
|
|
Definition at line 172 of file Batch.h. Referenced by CancelBatch(), and OnProcessTerminate(). |
|
|
Definition at line 175 of file Batch.h. Referenced by ClearBatch(), and OnProcessTerminate(). |
|
|
|
|
|
Definition at line 178 of file Batch.h. Referenced by GetFailedProjectLog(), GetFailedProjectName(), GetFailedProjectsCount(), OnProcessTerminate(), and RunBatch(). |
|
|
Definition at line 168 of file Batch.h. Referenced by AppendBatchFile(), and SaveBatchFile(). |
|
|
Definition at line 169 of file Batch.h. Referenced by AppendBatchFile(), and SaveBatchFile(). |
|
|
Definition at line 173 of file Batch.h. Referenced by CancelProject(), OnProcessTerminate(), and PauseBatch(). |
|
|
Definition at line 164 of file Batch.h. Referenced by AddAppToBatch(), AddProjectToBatch(), AllDone(), AppendBatchFile(), ChangePrefix(), ClearBatch(), CompareProjectsInLists(), GetFirstAvailable(), GetIndex(), GetProject(), GetProjectCount(), GetProjectCountByPath(), GetStatus(), ListBatch(), NoErrors(), OnProcessTerminate(), PauseBatch(), RemoveProjectAtIndex(), RunBatch(), RunNextInBatch(), SaveBatchFile(), SetStatus(), and SwapProject(). |
|
|
Definition at line 174 of file Batch.h. Referenced by CancelBatch(), CancelProject(), OnProcessTerminate(), RunBatch(), and RunNextInBatch(). |
|
|
Definition at line 166 of file Batch.h. Referenced by CancelProject(), CheckProjectExistence(), ClearBatch(), CompareProjectsInLists(), GetRunningCount(), OnDetect(), OnProcessTerminate(), OnStitch(), PauseBatch(), RunNextInBatch(), and ShowOutput(). |
|
|
Definition at line 57 of file Batch.h. Referenced by BatchFrame::OnCheckOverwrite(), and BatchFrame::PropagateDefaults(). |
|
|
Definition at line 54 of file Batch.h. Referenced by BatchFrame::OnCheckParallel(), HostApp::OnInit(), and BatchFrame::PropagateDefaults(). |
|
|
Definition at line 181 of file Batch.h. Referenced by OnStitch(). |
|
|
Definition at line 182 of file Batch.h. Referenced by OnDetect(). |
|
|
Definition at line 61 of file Batch.h. Referenced by BatchFrame::OnCheckSaveLog(), and OnProcessTerminate(). |
|
|
Definition at line 56 of file Batch.h. Referenced by BatchFrame::OnCheckShutdown(), HostApp::OnInit(), and BatchFrame::PropagateDefaults(). |
|
|
Definition at line 58 of file Batch.h. Referenced by LoadTemp(), BatchFrame::OnCheckVerbose(), OnDetect(), HostApp::OnInit(), BatchFrame::OnMinimize(), OnStitch(), BatchFrame::PropagateDefaults(), SaveTemp(), BatchFrame::SetInternalVerbose(), and BatchFrame::UpdateBatchVerboseStatus(). |
1.3.9.1