This class prints text to the display based on priorities. More...
#include "../include/Message.h"
Public Member Functions | |
| int | init () |
| Message (const char *str) | |
| Message () | |
| ~Message () | |
| int | destroy () |
| int | set (Messtype val) |
| int | set (const char *str) |
| Messtype | get () |
| int | getNum () |
| int | setPageLength (int val) |
| bool | check (Messtype type) |
| int | print (Messtype type, const char *mess,...) |
| int | hold (Messtype type, const char *mess) |
| int | printProgramInfo (const char *string) |
Static Public Attributes | |
| static const Messtype | NONE = 0x00000000L |
| static const Messtype | PRINT = 0x0000000FL |
| static const Messtype | PRINTA = 0x00000001L |
| static const Messtype | PRINTB = 0x00000002L |
| static const Messtype | PRINTC = 0x00000004L |
| static const Messtype | PRINTD = 0x00000008L |
| static const Messtype | ERROR = 0x00000030L |
| static const Messtype | ERRORA = 0x00000010L |
| static const Messtype | ERRORB = 0x00000020L |
| static const Messtype | WARN = 0x000000C0L |
| static const Messtype | WARNC = 0x00000040L |
| static const Messtype | WARND = 0x00000080L |
| static const Messtype | MESS = 0x00000F00L |
| static const Messtype | MESSA = 0x00000100L |
| static const Messtype | MESSB = 0x00000200L |
| static const Messtype | MESSC = 0x00000400L |
| static const Messtype | MESSD = 0x00000800L |
| static const Messtype | OUT1 = 0x0000F000L |
| static const Messtype | OUT1A = 0x00001000L |
| static const Messtype | OUT1B = 0x00002000L |
| static const Messtype | OUT1C = 0x00004000L |
| static const Messtype | OUT1D = 0x00008000L |
| static const Messtype | OUT2 = 0x000F0000L |
| static const Messtype | OUT2A = 0x00010000L |
| static const Messtype | OUT2B = 0x00020000L |
| static const Messtype | OUT2C = 0x00040000L |
| static const Messtype | OUT2D = 0x00080000L |
| static const Messtype | OUT3 = 0x00F00000L |
| static const Messtype | OUT3A = 0x00100000L |
| static const Messtype | OUT3B = 0x00200000L |
| static const Messtype | OUT3C = 0x00400000L |
| static const Messtype | OUT3D = 0x00800000L |
| static const Messtype | OUT4 = 0x0F000000L |
| static const Messtype | OUT4A = 0x01000000L |
| static const Messtype | OUT4B = 0x02000000L |
| static const Messtype | OUT4C = 0x04000000L |
| static const Messtype | OUT4D = 0x08000000L |
| static const Messtype | DEBUG = 0xF0000000L |
| static const Messtype | DEBUGA = 0x10000000L |
| static const Messtype | DEBUGB = 0x20000000L |
| static const Messtype | DEBUGC = 0x40000000L |
| static const Messtype | DEBUGD = 0x80000000L |
| static const Messtype | MASK_NONE = 0x00000000L |
| static const Messtype | MASK_PRINT = 0x0000000FL |
| static const Messtype | MASK_ERROR = 0x0000003FL |
| static const Messtype | MASK_WARN = 0x000000FFL |
| static const Messtype | MASK_MESS = 0x00000FFFL |
| static const Messtype | MASK_OUT1 = 0x0000FFFFL |
| static const Messtype | MASK_OUT2 = 0x000FFFFFL |
| static const Messtype | MASK_OUT3 = 0x00FFFFFFL |
| static const Messtype | MASK_OUT4 = 0x0FFFFFFFL |
| static const Messtype | MASK_DEBUG = 0xFFFFFFFFL |
This class prints text to the display based on priorities.
| Message::Message | ( | const char * | str | ) |
| Message::Message | ( | ) |
Constructor. Initializes class values.
References init().
| Message::~Message | ( | ) |
Destructor. Closes files
References WXP::File::close(), and WXP::File::isOpen().
| bool Message::check | ( | Messtype | type | ) |
Checks the message level to see if particular type is set for printing
| type | Message type |
Referenced by hold(), print(), and printProgramInfo().
| Messtype Message::get | ( | ) |
Gets the message level
| int Message::getNum | ( | ) |
Gets the number of times message level has been changed
| int Message::hold | ( | Messtype | type, | |
| const char * | mess | |||
| ) |
Pauses screen output depending on message level
References check(), and WXP::Wxp::pause().
Referenced by print().
| int Message::init | ( | ) |
Initializes class values
Referenced by Message().
| int Message::print | ( | Messtype | type, | |
| const char * | mess, | |||
| ... | ||||
| ) |
Prints string depending on whether its message level is to be displayed
| type | Strings message level | |
| mess | Message format/string | |
| ... | Additional parameters to use in format (see printf) |
References check(), WXP::File::close(), WXP::String::get(), WXP::DateTool::getCurrent(), hold(), WXP::File::isOpen(), WXP::File::open(), and WXP::File::printf().
| int Message::printProgramInfo | ( | const char * | string | ) |
Prints program information
| string | Program description |
References check(), and WXP::Wxp::getVersion().
| int Message::set | ( | const char * | str | ) |
Sets the message level from string
| str | String to decode to set message level |
References WXP::StrLib::getChar(), WXP::Strings::getInt(), WXP::Strings::getNum(), WXP::Strings::getString(), WXP::StrLib::iequal(), WXP::Strings::iequal(), WXP::File::open(), and WXP::String::set().
| int Message::set | ( | Messtype | val | ) |
Sets the message level from value
| val | Message level value |
| int Message::setPageLength | ( | int | val | ) |
Sets the page length for pausing output
| val | The length of a page in lines |
1.6.1