Qx v0.5.7
Qt Extensions Library
Loading...
Searching...
No Matches
Qx::IoOpReport Class Referencefinal

The IoOpReport class is a container for details regarding the outcome of an IO operation.

#include <qx/io/qx-ioopreport.h>

Collaboration diagram for Qx::IoOpReport:
[legend]

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
 

Constructor & Destructor Documentation

◆ IoOpReport() [1/6]

Qx::IoOpReport::IoOpReport ( )

Creates a null IO operation report.

See also
isNull() and isFailure().

◆ IoOpReport() [2/6]

Qx::IoOpReport::IoOpReport ( IoOpType op,
IoOpResultType res,
const QFileDevice & tar )

Creates an IO operation report for a file target.

Parameters
opThe type of operation
resThe type of result.
tarThe target file.
Note
tar is only used for descriptive purposes and the reference is not kept

◆ IoOpReport() [3/6]

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.

Parameters
opThe type of operation
resThe type of result.
tarThe target file.
Note
tar is only used for descriptive purposes and the pointer is not kept

◆ IoOpReport() [4/6]

Qx::IoOpReport::IoOpReport ( IoOpType op,
IoOpResultType res,
const QDir & tar )

Creates an IO operation report for a directory target.

Parameters
opThe type of operation
resThe type of result.
tarThe target directory.
Note
tar is only used for descriptive purposes and the reference is not kept

◆ IoOpReport() [5/6]

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.

Parameters
opThe type of operation
resThe type of result.
tarThe target directory.
Note
tar is only used for descriptive purposes and the pointer is not kept

◆ IoOpReport() [6/6]

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.

Parameters
opThe type of operation
resThe type of result.
tarA QFileInfo object that contains the target path.
Note
tar is only used for descriptive purposes and the reference is not kept

Member Function Documentation

◆ isFailure()

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.

◆ isNull()

bool Qx::IoOpReport::isNull ( ) const

Returns true if the report is null; otherwise returns false.

◆ operation()

IoOpType Qx::IoOpReport::operation ( ) const

Returns the type of operation.

◆ outcome()

QString Qx::IoOpReport::outcome ( ) const

Returns a string that describes the operation and its result.

◆ outcomeInfo()

QString Qx::IoOpReport::outcomeInfo ( ) const

Returns a string containing more details of the operation and its result.

◆ result()

IoOpResultType Qx::IoOpReport::result ( ) const

Returns the operation's result.

◆ resultTargetType()

IoOpTargetType Qx::IoOpReport::resultTargetType ( ) const

Returns the operation's target type.

◆ target()

QString Qx::IoOpReport::target ( ) const

Returns the path to the operations target.


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