VHISTlib
1.84.0.3018
|
A class containing all information stored in a VHIST argfile. More...
#include <argfile.h>
Public Types | |
enum | Verbosity { QUIET, NORMAL, VERBOSE } |
Specifies the amount of output generated by vhistadd when executing this argfile. More... | |
Public Member Functions | |
ArgFile () | |
Creates a new ArgFile object. | |
ArgFile (const QString &outVhistfile, const QString &rootfile=QString()) | |
Creates a new ArgFile object. | |
ArgFile (const ArgFile &rhs) | |
Copyconstructor of ArgFile. | |
~ArgFile () | |
Destroys the ArgFile object. | |
QString | toCommandline (bool supportVariables=true) const |
Generates a string containing the content of an argfile representing this ArgFile object. | |
void | setPretend (bool pretend) |
Activates or deactivates the pretend mode of vhistadd. | |
bool | pretend () const |
Returns whether the pretend mode of vhistadd is activated or not. | |
void | setDebugMode (bool debug) |
Activates or deactivates the debug mode of vhistadd. | |
bool | debugMode () const |
Returns whether the debug mode of vhistadd is activated or not. | |
void | setVerbosity (Verbosity verbosity) |
Sets the verbosity of vhistadd. | |
Verbosity | verbosity () const |
Returns the verbosity of vhistadd. | |
void | setShowHelp (bool showHelp) |
Sets if vhistadd's help is shown when executing vhistadd with this argfile. | |
bool | showHelp () const |
Returns whether the help of vhistadd is shown when executing this argfile. | |
void | setShowVersion (bool showVersion) |
Sets if vhistadd's version information is shown when executing vhistadd with this argfile. | |
bool | showVersion () const |
Returns whether the version of vhistadd is shown when executing this argfile. | |
void | setRootfile (const QString &rootfile) |
Sets the VHIST rootfile used in the workflowstep specified by this argfile. | |
QString | rootfile () const |
Returns the VHIST rootfile used in the workflowstep specified by this argfile. | |
void | setRootIsOptional (bool optional) |
Sets whether the VHIST rootfile specified in this argfile is optional or not. | |
bool | rootIsOptional () const |
Returns whether the VHIST rootfile is optional or not. | |
void | setTitle (const QString &title) |
Sets the title of the workflowstep described in this argfile. | |
QString | title () const |
Returns the title of the workflowstep described in this argfile. | |
void | setDescription (const QString &description) |
Sets the description of the workflowstep described in this argfile. | |
QString | description () const |
Returns the description of the workflowstep described in this argfile. | |
void | setComment (const QString &comment) |
Sets the comment of the workflowstep described in this argfile. | |
QString | comment () const |
Returns the comment of the workflowstep described in this argfile. | |
void | setTool (const QString &tool) |
Sets the tool name and version of the workflowstep described in this argfile. | |
QString | tool () const |
Returns the tool name and version of the workflowstep described in this argfile. | |
void | setToolpath (const QString &toolpath) |
Sets the path to the tool's binary of the workflowstep described in this argfile. | |
QString | toolpath () const |
Returns the path to the tool's binary of the workflowstep described in this argfile. | |
void | setHost (const QString &host) |
Sets the host of the workflowstep described in this argfile. | |
QString | host () const |
Returns the host's system name of the workflowstep described in this argfile. | |
void | setUser (const QString &user) |
Sets the user of the workflowstep described in this argfile. | |
QString | user () const |
Returns the user of the workflowstep described in this argfile. | |
void | setCommand (const QString &command) |
Sets the command of the workflowstep described in this argfile. | |
QString | command () const |
Returns the command of the workflowstep described in this argfile. | |
void | setPdfTitle (const QString &pdfTitle) |
Sets the title of the PDF document generated with this argfile. | |
QString | pdfTitle () const |
Returns the title of the PDF document generated by this argfile. | |
void | setPdfProducer (const QString &pdfProducer) |
Sets the producer of the PDF document generated with this argfile. | |
QString | pdfProducer () const |
Returns the producer of the PDF document generated by this argfile. | |
void | setPdfCreator (const QString &pdfCreator) |
Sets the creator of the PDF document generated with this argfile. | |
QString | pdfCreator () const |
Returns the creator of the PDF document generated by this argfile. | |
void | setPdfAuthor (const QString &pdfAuthor) |
Sets the author of the PDF document generated with this argfile. | |
QString | pdfAuthor () const |
Returns the author of the PDF document generated by this argfile. | |
void | setPdfKeywords (const QString &pdfKeywords) |
Sets the keywords of the PDF document generated with this argfile. | |
QString | pdfKeywords () const |
Returns the keywords of the PDF document generated by this argfile. | |
void | setPdfSubject (const QString &pdfSubject) |
Sets the subject of the PDF document generated with this argfile. | |
QString | pdfSubject () const |
Returns the subject of the PDF document generated by this argfile. | |
void | setReadme (const QString &readmeFile) |
Sets the path to the readme embedded at the beginning of the PDF document generated by this argfile. | |
QString | readme () const |
Returns the path to the readme embedded at the beginning of the PDF document generated by this argfile. | |
void | setFirstpage (const QString &firstPageFile) |
Sets the path to the template for the first page of the PDF document generated by this argfile. | |
QString | firstpage () const |
Returns the path to the template for the first page of the PDF document generated by this argfile. | |
void | clearVariables () |
sets variables back to the default values | |
void | clearRootVhistfiles () |
sets vhist root file back to the default value | |
WSFile * | lastFile () |
Returns a pointer to the last file in the list of input/output files. | |
WSFile * | addFile (const WSFile &file) |
Appends a file to the end of the list of input/output files. | |
int | numFiles () const |
Returns the number of input/output files in the workflowstep described in this argfile. | |
WSFile * | getFile (int index) |
Returns a pointer to the i-th file in the list of input/output files. | |
WSFile | getConstFile (int index) const |
Returns a copy of the i-th file in the list of input/output files. | |
void | clearFilelist () |
Removes all files from the list of input/output files. | |
void | removeFile (int index) |
Removes the file at the i-th position inside the queue. | |
void | addUserAttribute (const QString &key, const QString &value) |
Adds a user attribute to the workflowstep. | |
void | clearUserAttributes () |
Removes all user attributes. | |
QStringList | userAttributeKeys () const |
Returns a list of the keys of all user attributes in the workflowstep described by this argfile. | |
QString | userAttribute (const QString &key) const |
Returns the value of the user attribute attribute with key key. | |
void | addOutputVhistfile (const QString &filename) |
Adds a file to the list of output vhistfiles. | |
void | clearOutputVhistfiles () |
Removes all output vhistfiles. | |
int | numOutputVhistfiles () const |
Returns the number of output vhistfiles. | |
QString | outputVhistfile (int index) const |
Returns the i-th output vhistfile. | |
QString | getUndoWorkflowStep () const |
A class containing all information stored in a VHIST argfile.
The information is stored in a structured way. The content of this class can be serialized to an argfile using toCommandline(). To generate an ArgFile object from a given argfile, use vhist::ArgfileReader.
ArgFile::ArgFile | ( | const QString & | outVhistfile, |
const QString & | rootfile = QString() |
||
) |
Creates a new ArgFile object.
The name of one output VHIST file and the VHIST rootfile can be specified.
[in] | outVhistfile | The filename of the VHIST file, which is generated when executing this argfile. |
[in] | rootfile | The filename of the VHIST rootfile. |
Appends a file to the end of the list of input/output files.
A pointer to the added file is returned which can be used to modify the file after it's inclusion.
[in] | file | The input/output file, which should be added to the list of input/output files. |
void ArgFile::addOutputVhistfile | ( | const QString & | filename | ) |
Adds a file to the list of output vhistfiles.
[in] | filename | The filename of the output vhistfile. |
void ArgFile::addUserAttribute | ( | const QString & | key, |
const QString & | value | ||
) |
Adds a user attribute to the workflowstep.
If a user attribute with the same key does already exist, this attribute is replaced by the new attribute.
[in] | key | The key of the attribute. |
[in] | value | The value of the attribute. |
void ArgFile::clearRootVhistfiles | ( | ) |
sets vhist root file back to the default value
void ArgFile::clearVariables | ( | ) |
sets variables back to the default values
QString ArgFile::command | ( | ) | const |
Returns the command of the workflowstep described in this argfile.
QString ArgFile::comment | ( | ) | const |
Returns the comment of the workflowstep described in this argfile.
bool ArgFile::debugMode | ( | ) | const |
Returns whether the debug mode of vhistadd is activated or not.
true
if the debug mode is activated, false
otherwise. QString ArgFile::description | ( | ) | const |
Returns the description of the workflowstep described in this argfile.
QString ArgFile::firstpage | ( | ) | const |
Returns the path to the template for the first page of the PDF document generated by this argfile.
WSFile ArgFile::getConstFile | ( | int | index | ) | const |
Returns a copy of the i-th file in the list of input/output files.
If the given index is not valid, an object generated by the default constructor is returned. This function can be used to get input/output files of constant WSFile objects.
[in] | index | The index of the file, which should be returned. Indices are 0-based. |
WSFile * ArgFile::getFile | ( | int | index | ) |
Returns a pointer to the i-th file in the list of input/output files.
If the given index is not valid, NULL
is returned.
[in] | index | The index of the file, which should be returned. Indices are 0-based. |
NULl
if the index is not valid.QString ArgFile::host | ( | ) | const |
Returns the host's system name of the workflowstep described in this argfile.
WSFile * ArgFile::lastFile | ( | ) |
Returns a pointer to the last file in the list of input/output files.
If the list is empty, NULL is returned. The pointer can be used to modify the file.
int ArgFile::numFiles | ( | ) | const |
Returns the number of input/output files in the workflowstep described in this argfile.
int ArgFile::numOutputVhistfiles | ( | ) | const |
Returns the number of output vhistfiles.
QString ArgFile::outputVhistfile | ( | int | index | ) | const |
Returns the i-th output vhistfile.
[in] | index | The index of the output vhistfile to return. index is 0-based. If the index is not valid, an empty string is returned. |
QString ArgFile::pdfAuthor | ( | ) | const |
Returns the author of the PDF document generated by this argfile.
QString ArgFile::pdfCreator | ( | ) | const |
Returns the creator of the PDF document generated by this argfile.
QString ArgFile::pdfKeywords | ( | ) | const |
Returns the keywords of the PDF document generated by this argfile.
QString ArgFile::pdfProducer | ( | ) | const |
Returns the producer of the PDF document generated by this argfile.
QString ArgFile::pdfSubject | ( | ) | const |
Returns the subject of the PDF document generated by this argfile.
QString ArgFile::pdfTitle | ( | ) | const |
Returns the title of the PDF document generated by this argfile.
bool ArgFile::pretend | ( | ) | const |
Returns whether the pretend mode of vhistadd is activated or not.
true
if the pretend mode is activated, false
otherwise. QString ArgFile::readme | ( | ) | const |
Returns the path to the readme embedded at the beginning of the PDF document generated by this argfile.
void ArgFile::removeFile | ( | int | index | ) |
Removes the file at the i-th position inside the queue.
If index is invalid, no element is removes.
[in] | index | The index of the file to remove. |
QString ArgFile::rootfile | ( | ) | const |
Returns the VHIST rootfile used in the workflowstep specified by this argfile.
bool ArgFile::rootIsOptional | ( | ) | const |
Returns whether the VHIST rootfile is optional or not.
true
if the VHIST rootfile is optional, otherwise false
. void ArgFile::setCommand | ( | const QString & | command | ) |
Sets the command of the workflowstep described in this argfile.
[in] | command | The command of the workflowstep. |
void ArgFile::setComment | ( | const QString & | comment | ) |
Sets the comment of the workflowstep described in this argfile.
[in] | comment | The comment of the workflowstep. |
void ArgFile::setDebugMode | ( | bool | debug | ) |
Activates or deactivates the debug mode of vhistadd.
[in] | debug | If true , the debug mode of vhistadd is activated when executing this argfile. |
void ArgFile::setDescription | ( | const QString & | description | ) |
Sets the description of the workflowstep described in this argfile.
[in] | description | The description of the workflowstep. |
void ArgFile::setFirstpage | ( | const QString & | firstPageFile | ) |
Sets the path to the template for the first page of the PDF document generated by this argfile.
[in] | firstPageFile | The filename of the firstpage template. |
void ArgFile::setHost | ( | const QString & | host | ) |
Sets the host of the workflowstep described in this argfile.
[in] | host | The host of the workflowstep. |
void ArgFile::setPdfAuthor | ( | const QString & | pdfAuthor | ) |
Sets the author of the PDF document generated with this argfile.
[in] | pdfAuthor | The author of the PDF document. |
void ArgFile::setPdfCreator | ( | const QString & | pdfCreator | ) |
Sets the creator of the PDF document generated with this argfile.
[in] | pdfCreator | The creator of the PDF document. |
void ArgFile::setPdfKeywords | ( | const QString & | pdfKeywords | ) |
Sets the keywords of the PDF document generated with this argfile.
[in] | pdfKeywords | The keywords of the PDF document. |
void ArgFile::setPdfProducer | ( | const QString & | pdfProducer | ) |
Sets the producer of the PDF document generated with this argfile.
[in] | pdfProducer | The producer of the PDF document. |
void ArgFile::setPdfSubject | ( | const QString & | pdfSubject | ) |
Sets the subject of the PDF document generated with this argfile.
[in] | pdfSubject | The subject of the PDF document. |
void ArgFile::setPdfTitle | ( | const QString & | pdfTitle | ) |
Sets the title of the PDF document generated with this argfile.
[in] | pdfTitle | The title of the PDF document. |
void ArgFile::setPretend | ( | bool | pretend | ) |
Activates or deactivates the pretend mode of vhistadd.
[in] | pretend | If true , the pretend mode of vhistadd is activated when executing this argfile. |
void ArgFile::setReadme | ( | const QString & | readmeFile | ) |
Sets the path to the readme embedded at the beginning of the PDF document generated by this argfile.
[in] | readmeFile | The filename of the readme file. |
void ArgFile::setRootfile | ( | const QString & | rootfile | ) |
Sets the VHIST rootfile used in the workflowstep specified by this argfile.
[in] | rootfile | The VHIST rootfle used by this argfile. |
void ArgFile::setRootIsOptional | ( | bool | optional | ) |
Sets whether the VHIST rootfile specified in this argfile is optional or not.
[in] | optional | If true , the VHIST rootfile is optional, otherwise, it is mandatory. |
void ArgFile::setShowHelp | ( | bool | showHelp | ) |
Sets if vhistadd's help is shown when executing vhistadd with this argfile.
[in] | showHelp | If true , the help of vhistadd is shown. |
void ArgFile::setShowVersion | ( | bool | showVersion | ) |
Sets if vhistadd's version information is shown when executing vhistadd with this argfile.
[in] | showVersion | If true , the version of vhistadd is shown. |
void ArgFile::setTitle | ( | const QString & | title | ) |
Sets the title of the workflowstep described in this argfile.
[in] | title | The title of the workflowstep. |
void ArgFile::setTool | ( | const QString & | tool | ) |
Sets the tool name and version of the workflowstep described in this argfile.
[in] | tool | The tool name and version of the workflowstep. |
void ArgFile::setToolpath | ( | const QString & | toolpath | ) |
Sets the path to the tool's binary of the workflowstep described in this argfile.
[in] | toolpath | The toolpath of the workflowstep. |
void ArgFile::setUser | ( | const QString & | user | ) |
Sets the user of the workflowstep described in this argfile.
[in] | user | The user of the workflowstep. |
void ArgFile::setVerbosity | ( | ArgFile::Verbosity | verbosity | ) |
Sets the verbosity of vhistadd.
[in] | verbosity | The verbosity of vhistadd. |
bool ArgFile::showHelp | ( | ) | const |
Returns whether the help of vhistadd is shown when executing this argfile.
true
if the help of vhistadd is shown. bool ArgFile::showVersion | ( | ) | const |
Returns whether the version of vhistadd is shown when executing this argfile.
true
if the version of vhistadd is shown. QString ArgFile::title | ( | ) | const |
Returns the title of the workflowstep described in this argfile.
QString ArgFile::toCommandline | ( | bool | supportVariables = true | ) | const |
Generates a string containing the content of an argfile representing this ArgFile object.
supportVariables | If true , strings of the form $NAME inside the ArgFile object are regarded as variables and are not escaped inside the generated argfile. To insert a literal $ sign inside the argfile, the $ sign must be doubled. If false , all $ sign is inserted as a literal $ sign into the argfile. |
QString ArgFile::tool | ( | ) | const |
Returns the tool name and version of the workflowstep described in this argfile.
QString ArgFile::toolpath | ( | ) | const |
Returns the path to the tool's binary of the workflowstep described in this argfile.
QString ArgFile::user | ( | ) | const |
Returns the user of the workflowstep described in this argfile.
QString ArgFile::userAttribute | ( | const QString & | key | ) | const |
Returns the value of the user attribute attribute with key key.
If no user attribute with this key exists, an empty string is returned.
[in] | key | The key of the user attribute to return. |
QStringList ArgFile::userAttributeKeys | ( | ) | const |
Returns a list of the keys of all user attributes in the workflowstep described by this argfile.
This list can be used to iterate over all attributes.
ArgFile::Verbosity ArgFile::verbosity | ( | ) | const |
Returns the verbosity of vhistadd.