5#include "qx/io/qx_io_export.h"
43 IO_ERR_CANT_CREATE_PATH = 21,
52class QX_IO_EXPORT
IoOpReport final :
public AbstractError<"Qx::IoOpReport", 1>
56 static const inline QString NULL_TARGET = u
"<NULL>"_s;
57 static const inline QString TYPE_MACRO = u
"<target>"_s;
58 static const inline QHash<IoOpTargetType, QString> TARGET_TYPE_STRINGS = {
62 static const inline QString SUCCESS_TEMPLATE = uR
"(Successfully %1 %2 "%3")"_s;
63 static const inline QString ERROR_TEMPLATE = uR
"(Error while %1 %2 "%3")"_s;
64 static const inline QHash<IoOpType, QString> SUCCESS_VERBS = {
69 {IO_OP_MANIPULATE, u
"manipulated"_s}
71 static const inline QHash<IoOpType, QString> ERROR_VERBS = {
76 {IO_OP_MANIPULATE, u
"manipulating"_s}
78 static const inline QHash<IoOpResultType, QString> ERROR_INFO = {
86 {
IO_ERR_OPEN, u
"Could not open "_s + TYPE_MACRO + u
"."_s},
89 {
IO_ERR_REMOVE, u
"The "_s + TYPE_MACRO + u
" could not be removed."_s},
90 {
IO_ERR_RENAME, u
"The "_s + TYPE_MACRO + u
" could not be renamed."_s},
92 {
IO_ERR_RESIZE, u
"The "_s + TYPE_MACRO + u
" could not be resized."_s},
93 {
IO_ERR_COPY, u
"The "_s + TYPE_MACRO + u
" could not be copied."_s},
94 {
IO_ERR_DNE, u
"The "_s + TYPE_MACRO + u
" does not exist."_s},
95 {IO_ERR_PATH_DNE, u
"The containing path of the "_s + TYPE_MACRO + u
" does not exist."_s},
97 {
IO_ERR_EXISTS, u
"The "_s + TYPE_MACRO + u
" already exists."_s},
99 {IO_ERR_CANT_CREATE_PATH, u
"The path to the "_s + TYPE_MACRO + u
" could not be created."_s},
117 QString mOutcomeInfo;
132 quint32 deriveValue()
const override;
133 QString derivePrimary()
const override;
134 QString deriveSecondary()
const override;
IoOpResultType result() const
Definition qx-ioopreport.cpp:363
QString outcomeInfo() const
Definition qx-ioopreport.cpp:383
bool isFailure() const
Definition qx-ioopreport.cpp:390
QString outcome() const
Definition qx-ioopreport.cpp:378
IoOpType operation() const
Definition qx-ioopreport.cpp:358
IoOpReport()
Definition qx-ioopreport.cpp:191
IoOpTargetType resultTargetType() const
Definition qx-ioopreport.cpp:368
bool isNull() const
Definition qx-ioopreport.cpp:395
QString target() const
Definition qx-ioopreport.cpp:373
The Qx namespace is the main namespace through which all non-global functionality of the Qx library i...
Definition qx-abstracterror.cpp:13
IoOpResultType
Definition qx-ioopreport.h:21
@ IO_ERR_EXISTS
Definition qx-ioopreport.h:41
@ IO_ERR_ABORT
Definition qx-ioopreport.h:31
@ IO_ERR_CANT_CREATE
Definition qx-ioopreport.h:42
@ IO_ERR_DNE
Definition qx-ioopreport.h:38
@ IO_ERR_CURSOR_OOB
Definition qx-ioopreport.h:45
@ IO_ERR_TIMEOUT
Definition qx-ioopreport.h:32
@ IO_SUCCESS
Definition qx-ioopreport.h:22
@ IO_ERR_COPY
Definition qx-ioopreport.h:37
@ IO_ERR_READ
Definition qx-ioopreport.h:27
@ IO_ERR_FATAL
Definition qx-ioopreport.h:29
@ IO_ERR_FILE_SIZE_MISMATCH
Definition qx-ioopreport.h:44
@ IO_ERR_RESIZE
Definition qx-ioopreport.h:36
@ IO_ERR_OPEN
Definition qx-ioopreport.h:30
@ IO_ERR_WRITE
Definition qx-ioopreport.h:28
@ IO_ERR_OUT_OF_RES
Definition qx-ioopreport.h:26
@ IO_ERR_NULL
Definition qx-ioopreport.h:40
@ IO_ERR_ACCESS_DENIED
Definition qx-ioopreport.h:24
@ IO_ERR_WRONG_TYPE
Definition qx-ioopreport.h:25
@ IO_ERR_RENAME
Definition qx-ioopreport.h:34
@ IO_ERR_REMOVE
Definition qx-ioopreport.h:33
@ IO_ERR_FILE_NOT_OPEN
Definition qx-ioopreport.h:46
@ IO_ERR_REPOSITION
Definition qx-ioopreport.h:35
@ IO_ERR_UNKNOWN
Definition qx-ioopreport.h:23
IoOpTargetType
Definition qx-ioopreport.h:48
@ IO_DIR
Definition qx-ioopreport.h:48
@ IO_FILE
Definition qx-ioopreport.h:48
IoOpType
Definition qx-ioopreport.h:20
@ IO_OP_READ
Definition qx-ioopreport.h:20
@ IO_OP_INSPECT
Definition qx-ioopreport.h:20
@ IO_OP_WRITE
Definition qx-ioopreport.h:20
@ IO_OP_ENUMERATE
Definition qx-ioopreport.h:20
The qx-abstracterror.h header file provides access to the base class from which custom error types sh...