VHISTlib  1.84.0.3018
Public Types | Public Member Functions
vhist::ArgFile Class Reference

A class containing all information stored in a VHIST argfile. More...

#include <argfile.h>

List of all members.

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
WSFilelastFile ()
 Returns a pointer to the last file in the list of input/output files.
WSFileaddFile (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.
WSFilegetFile (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

Detailed Description

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.

See also:
vhist::ArgfileReader

Member Enumeration Documentation

Specifies the amount of output generated by vhistadd when executing this argfile.

Enumerator:
QUIET 

vhistadd will only generate error messages.

NORMAL 

vhistadd will generate a normal amount of output.

VERBOSE 

vhistadd will generate a large amount of output.


Constructor & Destructor Documentation

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.

Parameters:
[in]outVhistfileThe filename of the VHIST file, which is generated when executing this argfile.
[in]rootfileThe filename of the VHIST rootfile.

Member Function Documentation

WSFile * ArgFile::addFile ( const WSFile file)

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.

Parameters:
[in]fileThe input/output file, which should be added to the list of input/output files.
Returns:
A pointer to the appended file. This pointer can be used to modify the WSFile object after it's inclusion.
Note:
Since a copy of file is appended to the list, modifying the original WSFile object has no effect on the object in the list.
void ArgFile::addOutputVhistfile ( const QString &  filename)

Adds a file to the list of output vhistfiles.

Parameters:
[in]filenameThe 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.

Parameters:
[in]keyThe key of the attribute.
[in]valueThe 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.

Returns:
The command of the workflowstep.
QString ArgFile::comment ( ) const

Returns the comment of the workflowstep described in this argfile.

Returns:
The comment of the workflowstep.
bool ArgFile::debugMode ( ) const

Returns whether the debug mode of vhistadd is activated or not.

Returns:
true if the debug mode is activated, false otherwise.
QString ArgFile::description ( ) const

Returns the description of the workflowstep described in this argfile.

Returns:
The description of the workflowstep.
QString ArgFile::firstpage ( ) const

Returns the path to the template for the first page of the PDF document generated by this argfile.

Returns:
The path to the template for the first page of the PDF document.
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.

Parameters:
[in]indexThe index of the file, which should be returned. Indices are 0-based.
Returns:
A copy to the file.
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.

Parameters:
[in]indexThe index of the file, which should be returned. Indices are 0-based.
Returns:
A pointer to the file or NULl if the index is not valid.
Note:
The pointer returned is only valid as long as the file in inside the filelist.
QString ArgFile::host ( ) const

Returns the host's system name of the workflowstep described in this argfile.

Returns:
The host's system name of the workflowstep.
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.

Returns:
A pointer to the last input/output file or NULL if the list is empty.
int ArgFile::numFiles ( ) const

Returns the number of input/output files in the workflowstep described in this argfile.

Returns:
The number of input/output files.
int ArgFile::numOutputVhistfiles ( ) const

Returns the number of output vhistfiles.

Returns:
The number of output vhistfiles.
QString ArgFile::outputVhistfile ( int  index) const

Returns the i-th output vhistfile.

Parameters:
[in]indexThe index of the output vhistfile to return. index is 0-based. If the index is not valid, an empty string is returned.
Returns:
The requested output vhistfile.
QString ArgFile::pdfAuthor ( ) const

Returns the author of the PDF document generated by this argfile.

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.

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.

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.

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.

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.

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.

Returns:
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.

Returns:
The path to the readme embedded at the beginning of the PDF document.
void ArgFile::removeFile ( int  index)

Removes the file at the i-th position inside the queue.

If index is invalid, no element is removes.

Parameters:
[in]indexThe index of the file to remove.
QString ArgFile::rootfile ( ) const

Returns the VHIST rootfile used in the workflowstep specified by this argfile.

Returns:
The VHIST rootfile used in this argfile.
bool ArgFile::rootIsOptional ( ) const

Returns whether the VHIST rootfile is optional or not.

Returns:
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.

Parameters:
[in]commandThe command of the workflowstep.
void ArgFile::setComment ( const QString &  comment)

Sets the comment of the workflowstep described in this argfile.

Parameters:
[in]commentThe comment of the workflowstep.
void ArgFile::setDebugMode ( bool  debug)

Activates or deactivates the debug mode of vhistadd.

Parameters:
[in]debugIf 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.

Parameters:
[in]descriptionThe 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.

Parameters:
[in]firstPageFileThe filename of the firstpage template.
void ArgFile::setHost ( const QString &  host)

Sets the host of the workflowstep described in this argfile.

Parameters:
[in]hostThe host of the workflowstep.
void ArgFile::setPdfAuthor ( const QString &  pdfAuthor)

Sets the author of the PDF document generated with this argfile.

Parameters:
[in]pdfAuthorThe author of the PDF document.
void ArgFile::setPdfCreator ( const QString &  pdfCreator)

Sets the creator of the PDF document generated with this argfile.

Parameters:
[in]pdfCreatorThe creator of the PDF document.
void ArgFile::setPdfKeywords ( const QString &  pdfKeywords)

Sets the keywords of the PDF document generated with this argfile.

Parameters:
[in]pdfKeywordsThe keywords of the PDF document.
void ArgFile::setPdfProducer ( const QString &  pdfProducer)

Sets the producer of the PDF document generated with this argfile.

Parameters:
[in]pdfProducerThe producer of the PDF document.
void ArgFile::setPdfSubject ( const QString &  pdfSubject)

Sets the subject of the PDF document generated with this argfile.

Parameters:
[in]pdfSubjectThe subject of the PDF document.
void ArgFile::setPdfTitle ( const QString &  pdfTitle)

Sets the title of the PDF document generated with this argfile.

Parameters:
[in]pdfTitleThe title of the PDF document.
void ArgFile::setPretend ( bool  pretend)

Activates or deactivates the pretend mode of vhistadd.

Parameters:
[in]pretendIf 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.

Parameters:
[in]readmeFileThe filename of the readme file.
void ArgFile::setRootfile ( const QString &  rootfile)

Sets the VHIST rootfile used in the workflowstep specified by this argfile.

Parameters:
[in]rootfileThe VHIST rootfle used by this argfile.
Note:
If an empty string is passed as rootfile, no rootfile will be specified in the argfile.
void ArgFile::setRootIsOptional ( bool  optional)

Sets whether the VHIST rootfile specified in this argfile is optional or not.

Parameters:
[in]optionalIf 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.

Parameters:
[in]showHelpIf 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.

Parameters:
[in]showVersionIf true, the version of vhistadd is shown.
void ArgFile::setTitle ( const QString &  title)

Sets the title of the workflowstep described in this argfile.

Parameters:
[in]titleThe title of the workflowstep.
void ArgFile::setTool ( const QString &  tool)

Sets the tool name and version of the workflowstep described in this argfile.

Parameters:
[in]toolThe 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.

Parameters:
[in]toolpathThe toolpath of the workflowstep.
void ArgFile::setUser ( const QString &  user)

Sets the user of the workflowstep described in this argfile.

Parameters:
[in]userThe user of the workflowstep.
void ArgFile::setVerbosity ( ArgFile::Verbosity  verbosity)

Sets the verbosity of vhistadd.

Parameters:
[in]verbosityThe verbosity of vhistadd.
bool ArgFile::showHelp ( ) const

Returns whether the help of vhistadd is shown when executing this argfile.

Returns:
true if the help of vhistadd is shown.
bool ArgFile::showVersion ( ) const

Returns whether the version of vhistadd is shown when executing this argfile.

Returns:
true if the version of vhistadd is shown.
QString ArgFile::title ( ) const

Returns the title of the workflowstep described in this argfile.

Returns:
The title of the workflowstep.
QString ArgFile::toCommandline ( bool  supportVariables = true) const

Generates a string containing the content of an argfile representing this ArgFile object.

Parameters:
supportVariablesIf 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.
Returns:
The generated argfile.
QString ArgFile::tool ( ) const

Returns the tool name and version of the workflowstep described in this argfile.

Returns:
The tool name and version of the workflowstep.
QString ArgFile::toolpath ( ) const

Returns the path to the tool's binary of the workflowstep described in this argfile.

Returns:
The path to the tool's binary of the workflowstep.
QString ArgFile::user ( ) const

Returns the user of the workflowstep described in this argfile.

Returns:
The user of the workflowstep.
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.

Parameters:
[in]keyThe key of the user attribute to return.
Returns:
The value belonging to the user attribute with the given key.
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.

Returns:
A list of all user attribute keys.
ArgFile::Verbosity ArgFile::verbosity ( ) const

Returns the verbosity of vhistadd.

Returns:
The verbosity of vhistadd.

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

VHISTlib 1.84.0.3018 of Jun 28 2013, generated by doxygen.