Qx v0.5.8
Qt Extensions Library
|
The IoOpReport class is a container for details regarding the outcome of an IO operation.
#include <qx/io/qx-ioopreport.h>
Public Member Functions | |
IoOpReport () | |
IoOpReport (IoOpType op, IoOpResultType res, const QDir &tar) | |
IoOpReport (IoOpType op, IoOpResultType res, const QDir *tar) | |
IoOpReport (IoOpType op, IoOpResultType res, const QFileDevice &tar) | |
IoOpReport (IoOpType op, IoOpResultType res, const QFileDevice *tar) | |
IoOpReport (IoOpType op, IoOpResultType res, const QFileInfo &tar) | |
bool | isFailure () const |
bool | isNull () const |
IoOpType | operation () const |
QString | outcome () const |
QString | outcomeInfo () const |
IoOpResultType | result () const |
IoOpTargetType | resultTargetType () const |
QString | target () const |
Public Member Functions inherited from Qx::AbstractError<"Qx::IoOpReport", 1 > | |
operator bool () const | |
bool | operator!= (const AbstractError &other) const=default |
bool | operator== (const AbstractError &other) const=default |
Additional Inherited Members | |
Static Public Attributes inherited from Qx::AbstractError<"Qx::IoOpReport", 1 > | |
static constexpr quint16 | TYPE_CODE |
static constexpr QLatin1StringView | TYPE_NAME |
Protected Member Functions inherited from Qx::IError | |
IError ()=default | |
virtual QString | deriveCaption () const |
virtual QString | deriveDetails () const |
virtual Severity | deriveSeverity () const |
bool | operator!= (const IError &other) const =default |
bool | operator== (const IError &other) const =default |
Qx::IoOpReport::IoOpReport | ( | ) |
Creates a null IO operation report.
Qx::IoOpReport::IoOpReport | ( | IoOpType | op, |
IoOpResultType | res, | ||
const QFileDevice & | tar ) |
Creates an IO operation report for a file target.
op | The type of operation |
res | The type of result. |
tar | The target file. |
Qx::IoOpReport::IoOpReport | ( | IoOpType | op, |
IoOpResultType | res, | ||
const QFileDevice * | tar ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Creates an IO operation report for a file target. If tar is nulltpr
, res is ignored and the resultant report will indicate a null file error.
op | The type of operation |
res | The type of result. |
tar | The target file. |
Qx::IoOpReport::IoOpReport | ( | IoOpType | op, |
IoOpResultType | res, | ||
const QDir & | tar ) |
Creates an IO operation report for a directory target.
op | The type of operation |
res | The type of result. |
tar | The target directory. |
Qx::IoOpReport::IoOpReport | ( | IoOpType | op, |
IoOpResultType | res, | ||
const QDir * | tar ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Creates an IO operation report for a directory target.
If tar is nulltpr
, res is ignored and the resultant report will indicate a null directory error.
op | The type of operation |
res | The type of result. |
tar | The target directory. |
Qx::IoOpReport::IoOpReport | ( | IoOpType | op, |
IoOpResultType | res, | ||
const QFileInfo & | tar ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Creates an IO operation report for a target described by tar.
The target type is automatically determined. If the target path is empty, res is ignored and the resultant report will indicate a null file/directory error.
op | The type of operation |
res | The type of result. |
tar | A QFileInfo object that contains the target path. |
bool Qx::IoOpReport::isFailure | ( | ) | const |
Returns true
if the described operation failed; otherwise returns false
.
A null IoOpReport is not considered to describe a failure.
bool Qx::IoOpReport::isNull | ( | ) | const |
Returns true
if the report is null; otherwise returns false
.
IoOpType Qx::IoOpReport::operation | ( | ) | const |
Returns the type of operation.
QString Qx::IoOpReport::outcome | ( | ) | const |
Returns a string that describes the operation and its result.
QString Qx::IoOpReport::outcomeInfo | ( | ) | const |
Returns a string containing more details of the operation and its result.
IoOpResultType Qx::IoOpReport::result | ( | ) | const |
Returns the operation's result.
IoOpTargetType Qx::IoOpReport::resultTargetType | ( | ) | const |
Returns the operation's target type.
QString Qx::IoOpReport::target | ( | ) | const |
Returns the path to the operations target.