Message Class Reference

Message object used to pass messages throughout the Doomseeker's system. More...

#include <message.h>

Classes

class  Type
 One of possible, Doomseeker recognizable error types. More...
 

Public Member Functions

 Message ()
 'Null' message object, returns true on isIgnore().
 
 Message (unsigned type)
 Message with defined type but carrying nothing to display.
 
 Message (unsigned type, const QString &content)
 Message with defined type and custom display content.
 
 Message (const Message &other)
 
QString contents () const
 Customized displayable contents of this Message.
 
bool isCustom () const
 True if type() equals to CUSTOM_INFORMATION or CUSTOM_ERROR.
 
bool isError () const
 True if type() is equal to or greater than CUSTOM_ERROR.
 
bool isIgnore () const
 True for 'Null' messages.
 
bool isInformation () const
 True if type() is equal to or greater than CUSTOM_INFORMATION, and lesser than CUSTOM_ERROR.
 
Messageoperator= (const Message &other)
 
unsigned timestamp () const
 Generation time in seconds since UTC epoch.
 
unsigned type () const
 Message::Type.
 

Static Public Member Functions

static Message customError (const QString &content)
 Convenience method. Sets type to Type::CUSTOM_ERROR.
 
static Message customInformation (const QString &content)
 Convenience method. Sets type to Type::CUSTOM_INFORMATION.
 

Detailed Description

Message object used to pass messages throughout the Doomseeker's system.

Message type and content is carried over through this object. If type member is set to Message::Type::IGNORE_TYPE then content member should be ignored and the entire Message object should be treated as carrying no message at all.

Messages can be displayed by the application through a pop-up box or in the program log. This may differ depending on message severity and current procedure.

Message objects are safe to copy.

Definition at line 63 of file message.h.

Constructor & Destructor Documentation

Message::Message ( )

'Null' message object, returns true on isIgnore().

Message::Message ( unsigned  type)

Message with defined type but carrying nothing to display.

Sometimes Doomseeker may override and display a hard-coded message anyway, depending on current procedure and message type.

Definition at line 52 of file message.cpp.

Message::Message ( unsigned  type,
const QString &  content 
)

Message with defined type and custom display content.

Sometimes Doomseeker may override and display a hard-coded message anyway, depending on current procedure and message type.

Definition at line 58 of file message.cpp.

Member Function Documentation

QString Message::contents ( ) const

Customized displayable contents of this Message.

Definition at line 87 of file message.cpp.

static Message Message::customError ( const QString &  content)
inlinestatic

Convenience method. Sets type to Type::CUSTOM_ERROR.

Definition at line 123 of file message.h.

static Message Message::customInformation ( const QString &  content)
inlinestatic

Convenience method. Sets type to Type::CUSTOM_INFORMATION.

Definition at line 131 of file message.h.

bool Message::isCustom ( ) const

True if type() equals to CUSTOM_INFORMATION or CUSTOM_ERROR.

Definition at line 99 of file message.cpp.

bool Message::isError ( ) const

True if type() is equal to or greater than CUSTOM_ERROR.

Definition at line 104 of file message.cpp.

bool Message::isIgnore ( ) const

True for 'Null' messages.

Definition at line 109 of file message.cpp.

bool Message::isInformation ( ) const

True if type() is equal to or greater than CUSTOM_INFORMATION, and lesser than CUSTOM_ERROR.

Definition at line 114 of file message.cpp.

unsigned Message::timestamp ( ) const

Generation time in seconds since UTC epoch.

Definition at line 119 of file message.cpp.

unsigned Message::type ( ) const

Message::Type.

Definition at line 124 of file message.cpp.


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