VHISTlib
1.84.0.3018
|
This class contains the description of a single input/output file specified in an argfile. More...
#include <wsfile.h>
Public Types | |
enum | FilePurpose { INPUT_FILE, OUTPUT_FILE } |
The purpose of a file inside one workflowstep. More... | |
Public Member Functions | |
WSFile () | |
The default constructor of WSFile. | |
WSFile (const WSFile &rhs) | |
The copy constructor of WSFile. | |
bool | operator== (const WSFile &rhs) |
bool | operator!= (const WSFile &rhs) |
QString | toCommandline (bool supportVariables=true) |
Creates a string containing the vhistadd commandline for this file. | |
QString | filetype () const |
Returns the current filetype of this input/output file. | |
void | setFiletype (const QString &filetype) |
Sets the filetype associated with the file. | |
QString | filename () const |
Returns the current filepath and filename as one string. | |
void | setFilename (const QString &filename) |
Sets the name of the file without the path. | |
QString | filepath () const |
Returns the filepath without the filename. | |
void | setFilepath (const QString &filepath) |
Sets the filepath without the filename. | |
void | setFilenameAndPath (const QString &file) |
Sets the filename and the file path as one string. | |
bool | optional () const |
This functions returns whether the file is optional. | |
void | setOptional (bool optional) |
Sets whether the file is optional or not. | |
bool | compress () const |
Returns whether the input/output file should be embedded in compressed or uncompressed form. | |
void | setCompress (bool compress) |
Sets whether the input/output file should be embedded in compressed or uncompressed form. | |
bool | inputFile () const |
This function returns whether the file is an input or output file. | |
void | setInputFile (bool isInputFile) |
Sets whether the file is an input or an output file to the workflowstep. | |
FilePurpose | filePurpose () const |
Returns the purpose of the file in the workflowstep. | |
void | setFilePurpose (const FilePurpose &purpose) |
Sets the purpose of the file in the workflowstep. | |
QString | description () const |
Returns the current file description text. | |
void | setDescription (const QString &description) |
Sets the description of the file. | |
QString | comment () const |
Returns the comment of the file. | |
void | setComment (const QString &comment) |
Sets the comment of the file. | |
bool | embed () const |
Returns whether the input/output file should be embedded into the VHIST file. | |
void | setEmbed (bool embed) |
Sets whether the input/output file should be embedded into the VHIST file. | |
bool | autoMD5 () const |
This function returns whether vhistadd should automatically generate an MD5 checksum for the file. | |
void | setAutoMD5 (bool compress) |
Sets whether vhistadd should automatically generate an MD5 checksum for this file. | |
QString | md5File () const |
Returns the MD5 file of this input/output file. | |
void | setMD5File (const QString &file) |
Sets an MD5 file for this input/output file. | |
bool | previewWS () const |
Returns whether the previewws flag is active for this file. | |
void | setPreviewWS (bool previewWS) |
Activates/deactivates the previewws flag for this file. | |
bool | preview () const |
Returns whether the preview flag is active for this file. | |
void | setPreview (bool preview) |
Activates/deactivates the preview flag for this file. | |
bool | thumbnail () const |
Returns whether the thumbnail flag is active for this file. | |
void | setThumbnail (bool thumbnail) |
Activates/deactivates the thumbnail flag for this file. | |
bool | thumbnailOnly () const |
Returns whether the thumbnailonly flag is active for this file. | |
void | setThumbnailOnly (bool thumbnailOnly) |
Activates/deactivates the thumbnailonly flag for this file. | |
void | clearUserAttributes () |
Removes all user-defined attributes from the input/output file. | |
void | addUserAttribute (const QString &key, const QString &value) |
Adds a new user-defined attribute to the input/output file. | |
QStringList | userAttributeKeys () const |
Returns a list of all keys appearing in user defined attributes. | |
QString | userAttribute (const QString &key) const |
Returns the value associated with the given key. |
This class contains the description of a single input/output file specified in an argfile.
WSFile::WSFile | ( | const WSFile & | rhs | ) |
void WSFile::addUserAttribute | ( | const QString & | key, |
const QString & | value | ||
) |
Adds a new user-defined attribute to the input/output file.
An attribute is an arbitrary key-value pair. If another attribute with the same key does already exist, it is overwritten by the new attribute.
[in] | key | The key of the attribute. |
[in] | value | The value of the attribute. |
bool WSFile::autoMD5 | ( | ) | const |
This function returns whether vhistadd should automatically generate an MD5 checksum for the file.
true
if a checksum should be calculated, false otherwise. QString WSFile::comment | ( | ) | const |
Returns the comment of the file.
bool WSFile::compress | ( | ) | const |
Returns whether the input/output file should be embedded in compressed or uncompressed form.
true
if the file should be compressed, false
otherwise. QString WSFile::description | ( | ) | const |
Returns the current file description text.
bool WSFile::embed | ( | ) | const |
Returns whether the input/output file should be embedded into the VHIST file.
true
if the file should be embedded into the VHIST file, false
otherwise. QString WSFile::filename | ( | ) | const |
Returns the current filepath and filename as one string.
QString WSFile::filepath | ( | ) | const |
Returns the filepath without the filename.
WSFile::FilePurpose WSFile::filePurpose | ( | ) | const |
Returns the purpose of the file in the workflowstep.
A file can be either an input- or an outputfile.
QString WSFile::filetype | ( | ) | const |
Returns the current filetype of this input/output file.
bool WSFile::inputFile | ( | ) | const |
This function returns whether the file is an input or output file.
true
if the file is an input file, false
if it is an output file. QString WSFile::md5File | ( | ) | const |
Returns the MD5 file of this input/output file.
bool WSFile::optional | ( | ) | const |
This functions returns whether the file is optional.
true
if the file is optional, false
otherwhise. bool WSFile::preview | ( | ) | const |
Returns whether the preview flag is active for this file.
true
if the preview flag is active for this file, false
otherwise. bool WSFile::previewWS | ( | ) | const |
Returns whether the previewws flag is active for this file.
true
if the previewws flag is active for this file, false
otherwise. void WSFile::setAutoMD5 | ( | bool | md5 | ) |
Sets whether vhistadd should automatically generate an MD5 checksum for this file.
[in] | md5 | true if a checksum should be calculate and false otherwise. |
void WSFile::setComment | ( | const QString & | comment | ) |
Sets the comment of the file.
[in] | comment | A comment concerning the file. |
void WSFile::setCompress | ( | bool | compress | ) |
Sets whether the input/output file should be embedded in compressed or uncompressed form.
If the file is not embedded anyway, this flag is ignored by vhistadd.
[in] | compress | true if the file should be compressed, false otherwise. |
void WSFile::setDescription | ( | const QString & | description | ) |
Sets the description of the file.
[in] | description | Text describing the file. |
void WSFile::setEmbed | ( | bool | embed | ) |
Sets whether the input/output file should be embedded into the VHIST file.
embed | true if the file should be embedded into the VHIST file. |
void WSFile::setFilename | ( | const QString & | name | ) |
Sets the name of the file without the path.
[in] | name | The filename without path. |
void WSFile::setFilenameAndPath | ( | const QString & | filename | ) |
Sets the filename and the file path as one string.
[in] | filename | The path + name of the file. |
void WSFile::setFilepath | ( | const QString & | path | ) |
Sets the filepath without the filename.
[in] | path | The filepath. |
void WSFile::setFilePurpose | ( | const FilePurpose & | purpose | ) |
Sets the purpose of the file in the workflowstep.
[in] | purpose | The purpose of the file in the workflowstep. |
void WSFile::setFiletype | ( | const QString & | filetype | ) |
Sets the filetype associated with the file.
[in] | filetype | The filetype of the file. |
void WSFile::setInputFile | ( | bool | inputFile | ) |
Sets whether the file is an input or an output file to the workflowstep.
[in] | inputFile | true if this file is an input file, false if it is an output file. |
void WSFile::setMD5File | ( | const QString & | file | ) |
Sets an MD5 file for this input/output file.
An MD5 file is a file which contains an MD5 checksum in hexdigests in it's first line.
[in] | file | The name of the MD5 file. |
void WSFile::setOptional | ( | bool | optional | ) |
Sets whether the file is optional or not.
If the file should be embedded into the VHIST file and is not found by vhistadd, this flag determines whether vhistadd emits an error or ignores the missing file.
[in] | optional | true if the file is optional, false otherwise. |
void WSFile::setPreview | ( | bool | preview | ) |
Activates/deactivates the preview flag for this file.
[in] | preview | true if the flag should be activated, false otherwise. |
void WSFile::setPreviewWS | ( | bool | previewWS | ) |
Activates/deactivates the previewws flag for this file.
[in] | previewWS | true if the flag should be activated, false otherwise. |
void WSFile::setThumbnail | ( | bool | thumbnail | ) |
Activates/deactivates the thumbnail flag for this file.
[in] | thumbnail | true if the flag should be activated, false otherwise. |
void WSFile::setThumbnailOnly | ( | bool | thumbnailOnly | ) |
Activates/deactivates the thumbnailonly flag for this file.
[in] | thumbnailOnly | true if the flag should be activated, false otherwise. |
bool WSFile::thumbnail | ( | ) | const |
Returns whether the thumbnail flag is active for this file.
true
if the thumbnail flag is active for this file, false
otherwise. bool WSFile::thumbnailOnly | ( | ) | const |
Returns whether the thumbnailonly flag is active for this file.
true
if the thumbnailonly flag is active for this file, false
otherwise. QString WSFile::toCommandline | ( | bool | supportVariables = true | ) |
Creates a string containing the vhistadd commandline for this file.
QString WSFile::userAttribute | ( | const QString & | key | ) | const |
Returns the value associated with the given key.
If the key does not appear in any attribute, an empty string is returned.
[in] | key | The key of a user-defined attribute. |
QStringList WSFile::userAttributeKeys | ( | ) | const |
Returns a list of all keys appearing in user defined attributes.
This list can be used to iterate over all attributes.