WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
WXP::Message Class Reference

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
 

Detailed Description

This class prints text to the display based on priorities.

Author
Dan Vietor
Deprecated:

Constructor & Destructor Documentation

◆ Message() [1/2]

Message::Message ( const char *  str)

Constructor. Set the message level from string

Parameters
strString to decode for message level

References init(), and set().

◆ Message() [2/2]

Message::Message ( )

Constructor. Initializes class values.

References init().

◆ ~Message()

Message::~Message ( )

Destructor. Closes files

References WXP::File::close(), and WXP::File::isOpen().

Member Function Documentation

◆ check()

bool Message::check ( Messtype  type)

Checks the message level to see if particular type is set for printing

Parameters
typeMessage type

Referenced by hold(), print(), and printProgramInfo().

◆ get()

Messtype Message::get ( )

Gets the message level

Returns
The message level value

◆ getNum()

int Message::getNum ( )

Gets the number of times message level has been changed

Returns
Number of times level has been changed

◆ hold()

int Message::hold ( Messtype  type,
const char *  mess 
)

Pauses screen output depending on message level

Parameters
typeMessage level for pause
messMessage to display when paused

References check(), and WXP::Wxp::pause().

Referenced by print().

◆ init()

int Message::init ( )

Initializes class values

Referenced by Message(), and Message().

◆ print()

int Message::print ( Messtype  type,
const char *  mess,
  ... 
)

Prints string depending on whether its message level is to be displayed

Parameters
typeStrings message level
messMessage 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().

◆ printProgramInfo()

int Message::printProgramInfo ( const char *  string)

Prints program information

Parameters
stringProgram description

References check(), and WXP::Wxp::getVersion().

◆ set() [1/2]

int Message::set ( const char *  str)

◆ set() [2/2]

int Message::set ( Messtype  val)

Sets the message level from value

Parameters
valMessage level value

Referenced by Message().

◆ setPageLength()

int Message::setPageLength ( int  val)

Sets the page length for pausing output

Parameters
valThe length of a page in lines

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