#include <molequeue/program.h>
Public Types | |
enum | LaunchSyntax { CUSTOM = 0, PLAIN, INPUT_ARG, INPUT_ARG_NO_EXT, REDIRECT, INPUT_ARG_OUTPUT_REDIRECT, SYNTAX_COUNT } |
Signals | |
void | nameChanged (const QString &newName, const QString &oldName) |
Public Member Functions | |
Program (Queue *parentQueue=0) | |
Program (const Program &other) | |
Program & | operator= (const Program &other) |
Server * | server () |
const Server * | server () const |
QueueManager * | queueManager () |
const QueueManager * | queueManager () const |
Queue * | queue () |
const Queue * | queue () const |
QString | queueName () const |
bool | importSettings (const QString &fileName) |
bool | exportSettings (const QString &fileName) const |
bool | writeJsonSettings (QJsonObject &json, bool exportOnly) const |
bool | readJsonSettings (const QJsonObject &json, bool importOnly) |
void | setName (const QString &newName) |
QString | name () const |
void | setExecutable (const QString &str) |
QString | executable () const |
void | setArguments (const QString &str) |
QString | arguments () const |
void | setOutputFilename (const QString &str) |
QString | outputFilename () const |
void | setLaunchSyntax (LaunchSyntax s) |
LaunchSyntax | launchSyntax () const |
void | setCustomLaunchTemplate (const QString &str) |
QString | customLaunchTemplate () const |
QString | launchTemplate () const |
Static Public Member Functions | |
static QString | generateFormattedExecutionString (const QString &executable_, const QString &arguments_, const QString &outputFilename_, LaunchSyntax syntax_) |
Protected Attributes | |
Queue * | m_queue |
QueueManager * | m_queueManager |
Server * | m_server |
QString | m_name |
QString | m_executable |
QString | m_arguments |
QString | m_outputFilename |
LaunchSyntax | m_launchSyntax |
QString | m_customLaunchTemplate |
A class defining interactions with an executable accessible by a Queue.
The Program class describes an executable which runs a Job on a particular Queue. Each Program object is unique to the Queue, and contains details for running the executable, any arguments it needs, and the names of files it reads/produces.
enum LaunchSyntax |
Enum used for various common styles of execution syntax.
QueueManager* queueManager | ( | ) |
const QueueManager* queueManager | ( | ) | const |
bool importSettings | ( | const QString & | fileName | ) |
Import the program's configuration from the indicated file (.mqp format)
bool exportSettings | ( | const QString & | fileName | ) | const |
Export the program's configuration into the indicated file (.mqp format)
bool writeJsonSettings | ( | QJsonObject & | json, |
bool | exportOnly | ||
) | const |
writeJsonSettings Write the program's internal state into a JSON object.
value | Target JSON object. |
exportOnly | If true, instance specific information (e.g. system specific paths, etc) is omitted. |
bool readJsonSettings | ( | const QJsonObject & | json, |
bool | importOnly | ||
) |
readJsonSettings Initialize the program's internal state from a JSON object.
value | Source JSON object. |
importOnly | If true, instance specific information (e.g. system specific paths, etc) is ignored. |
void setName | ( | const QString & | newName | ) |
Set the name of the program. This is the name that will show up in the GUI, and many common names such as GAMESS, GAMESS-UK, Gaussian, MolPro etc are used by GUIs such as Avogadro with its input generator dialogs to match up input files to programs.
newName | Name to use in GUIs |
QString name | ( | ) | const |
QString launchTemplate | ( | ) | const |
|
signal |
Emitted when the name of the program is changed.
|
protected |
The QueueManager owning the Queue this Program belongs to.
|
protected |
GUI-visible name.
|
protected |
Name of executable.
|
protected |
Executable arguments.
|
protected |
Output filename.
|
protected |
Launch syntax style.
|
protected |
Bash/Shell/Queue script template used to launch program.