Isis 3 Programmer Reference
|
Execute External Programs and Commands. More...
#include <ProgramLauncher.h>
Static Public Member Functions | |
static void | RunIsisProgram (QString isisProgramName, QString arguments) |
Executes the Isis program with the given arguments. | |
static void | RunSystemCommand (QString commandLine) |
This runs arbitrary system commands. | |
Private Member Functions | |
ProgramLauncher () | |
Construction is not allowed. | |
~ProgramLauncher () | |
Destruction is not allowed. | |
ProgramLauncher (ProgramLauncher &other) | |
Copy construction is not allowed. | |
ProgramLauncher & | operator= (ProgramLauncher &other) |
Assignment is not allowed. | |
Static Private Member Functions | |
static IException | ProcessIsisMessageFromChild (QString code, QString msg) |
This interprets a message sent along the pipe from a child process to us (the parent). | |
Execute External Programs and Commands.
This class is designed to handle running any other programs or commands.
2010-12-03 Steven Lambright - Original version
2011-08-19 Jeannie Backer - Modified unitTest to use $temporary variable instead of /tmp directory.
2011-08-19 Kelvin Rodriguez - Added truth data for OS X 10.11 Part of proting to 10.11.
2017-05-19 Christopher Combs - Modified unitTest.cpp: now creates unitTest.cub to perform tests on. Allows test to pass when not using the default data area. Fixes #4738.
Definition at line 34 of file ProgramLauncher.h.
|
private |
Construction is not allowed.
|
private |
Destruction is not allowed.
|
private |
Copy construction is not allowed.
other |
|
private |
Assignment is not allowed.
other |
|
staticprivate |
This interprets a message sent along the pipe from a child process to us (the parent).
code | The text code of the message - this is used to determine what the message contains. |
msg | The data sent along with a code. This is a string, number, PvlGroup, Pvl, etc... really anything. It depends on the code parameter. |
Definition at line 148 of file ProgramLauncher.cpp.
References Isis::IException::append(), Isis::Application::GuiLog(), Isis::Application::Log(), Isis::toInt(), and Isis::Application::UpdateProgress().
Referenced by RunIsisProgram().
|
static |
Executes the Isis program with the given arguments.
This will handle logs, GUI updates, and similar tasks. Please use this even when there is no instance of Isis::Application, so long as the thing you are running has an Isis::Application (do not use this for qview, qnet, qtie, etc for now).
Please do not specify -pid.
programName | The Isis program name to be run (i.e. catlab, cubeatt) |
parameters | The arguments to give to the program that is being run |
Definition at line 36 of file ProgramLauncher.cpp.
References Isis::IException::append(), ProcessIsisMessageFromChild(), Isis::IException::Programmer, Isis::toString(), Isis::IException::Unknown, and Isis::Application::UserName().
Referenced by Isis::Cube::reformatOldIsisLabel(), and Isis::Pipeline::Run().
|
static |
This runs arbitrary system commands.
You can run programs like "qview" with this, or commands like "ls | grep *.cpp > out.txt". Please do not use this for Isis programs not in qisis.
Example: qview should use RunIsisProgram to run camstats. camstats should use RunSystemCommand to run qview.
fullCommand | A string containing the command formatted like what you would type in a terminal |
Definition at line 205 of file ProgramLauncher.cpp.
References Isis::IException::Programmer, and Isis::toString().
Referenced by Isis::UserInterface::evaluateOption(), Isis::Application::GetEnviromentInfo(), Isis::Application::GetLibraryDependencies(), Isis::Application::GetSystemDiskSpace(), Isis::Application::GetUnameInfo(), Isis::Cube::reformatOldIsisLabel(), Isis::ControlMeasureEditWidget::saveChips(), Isis::ControlPointEdit::saveChips(), and Isis::GuiCubeParameter::ViewCube().