You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

156 lines
4.4 KiB

5 years ago
#ifndef ELOGID_H
#define ELOGID_H
#include <QtCore>
/**
* @class ElogId ElogId.h "include/ElogId.h"
* @brief The ELogId enumeration class
* @date 07 Aug 2019
*
* Contains the reference enumerator for
* identificaiton of log messages.
*/
class ELogID : public QObject
{
Q_OBJECT
private:
// Private constructor prevent the enumeration class from being instantiated
explicit ELogID(QObject *parent = nullptr);
public:
/**
* @brief Log Id Enumerator
*
* Contains the reference enumerator for
* identificaiton of log messages.
*/
enum eLogId : quint8
{
/// 0-Folder does not exist
FolderNotExist,
/// 1-Error while opening file
FileOpenError,
/// 2-Error while loading XML Document
XMLDocumentLoadError,
/// 3-Loaded XML Document is corrupted
XMLDocumentCorrupted,
/// 4-Received Message with Invalid Type
ReceivedInvalidMessage,
/// 5-Invalid writer type
LogWriterCreationError,
/// Log message is not valid
InvalidLogId,
///fatal error
FatalError,
/// 6-Reserved for Test Log
TestLog,
/// 7-Opencl error
OpenCL,
/// 9-Unknown strategy or the strategy is not registered
StrategyNotRegistered,
/// 10-Error occured while pushing back strategies
StrategyPushBackError,
/// 11-Received invalid command request
InvalidCommand,
/// 12-Strategy pushed back successfully
StrategyPushedBack,
/// 13-Changed image mode successfully
ChangedImageMode,
/// 14-Kernel file opened successfully
KernelFileOpened,
/// 15-Error occurred while getting CL Platform
CLPlatformError,
/// 16-Information about CL Platform
CLPlatformInfo,
/// 17-Error occurred while creating CL Context
CLContextError,
/// 18-Information about CL Context
CLContextInfo,
/// 19-Error occured while initializing BIP event processor
BIPInitError,
/// 20-Error occured while building kernel
CLKernelBuildError,
/// 21-Kernel built successfully
CLKernelBuilt,
/// 22-Error occured while initiating kernel
CLKernelCreationError,
/// 23-Kernel created successfully
CLKernelCreated,
/// 24-Received invalid frame
InvalidFrame,
/// 25-Error occured while creating CL Buffer
CLBufferError,
/// 26-Allocated CL buffer successfully
CLBufferAllocated,
/// 27-Error occured while processing CL strategy sequence
CLProcessError,
/// 28-CL strategy sequences processed successfully
CLProcessSuccess,
/// 29-Error occured while creating kernel functor
CLKernelFunctorError,
/// 30-Kernel functor created successfully
CLKernelFunctorCreated,
/// 31-Error occured while creating CL Command Queue
CLCommandQueueCreationError,
/// 32-CL Command Queue created successfully
CLCommandQueueCreated,
/// 33-An error occured related to CL Kernel
CLKernelError,
/// 34-Info about CL Kernel functions
CLKernelInfo,
/// 35-An error occured related to CL Device
CLDeviceError,
/// 36-Info about CL Device
CLDeviceInfo,
/// 37-An error occured while creating CL strategy
CLStrategyError,
/// 38-An error occured while running the kernel
CLKernelRunError,
/// 39-Info about running kernel
CLKernelRunInfo,
/// 40-An error raised while manipulating CL Frame
CLFrameError,
/// 41-Info about CL Frame
CLFrameInfo,
/// An incorrect sender has sent a message to me!
IncorrectSender,
/// Successfully changed the state of the module
StateChangeSuccess,
///Cine: invalid playMode
IvalidPlayMode
};
Q_ENUM(eLogId)
/**
* @brief enum to string converter
* @param qtEnum Enumerator to be converted to the relevant string
* @return String relevant to the input eLogId enumerator
* @date 07 Aug 2019
*
* Converts the eLogId enumerator to the relevant string
*/
static QString qtEnumToQString(const eLogId qtEnum)
{
return QString(QMetaEnum::fromType<eLogId>().valueToKey(qtEnum));
}
/**
* @brief enum to <int>value converter
* @param qtEnum Enumerator to be converted to the relevant value
* @return Identification value relevant to the input eLogId enumerator
* @date 07 Aug 2019
*
* Converts the eLogId enumerator to the relevant identification number
*/
static int qtEnumToInt(const eLogId qtEnum)
{
return QMetaEnum::fromType<eLogId>().value(qtEnum);
}
};
#endif // ELOGID_H