Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Msg Class Reference

#include <Msg.h>

List of all members.

Public Types

typedef int LogLevel_t

Static Public Member Functions

LogLevel_t GetLevelCode (const char *level)
const char * LevelAsString (int level)
int GetFormatCode (const char *fmt)

Static Public Attributes

const LogLevel_t kMinLogLevel = 0
const LogLevel_t kVerbose = 0
const LogLevel_t kDebug = 1
const LogLevel_t kSynopsis = 2
const LogLevel_t kInfo = 3
const LogLevel_t kWarning = 5
const LogLevel_t kError = 6
const LogLevel_t kFatal = 7
const LogLevel_t kNLogLevel = 8
const int kPriority = 0x01
const int kName = 0x02
const int kTime = 0x04
const int kFile = 0x08
const int kCVSId = 0x10
const int kLine = 0x20
const int kHost = 0x40
const int kPID = 0x80
const int kRunSnarl = 0x100
const int kStackTrace = 0x200
const int kColorAll = 0x1000
const int kBold = 0x2000
const int kDim = 0x4000
const int kUnderline = 0x8000
const int kBlink = 0x10000
const int kReverse = 0x20000
const int kBlack = 0x100000
const int kRed = 0x200000
const int kGreen = 0x300000
const int kYellow = 0x400000
const int kBlue = 0x500000
const int kMagenta = 0x600000
const int kCyan = 0x700000
const int kWhite = 0x800000
const int kBgBlack = 0x1000000
const int kBgRed = 0x2000000
const int kBgGreen = 0x3000000
const int kBgYellow = 0x4000000
const int kBgBlue = 0x5000000
const int kBgMagenta = 0x6000000
const int kBgCyan = 0x7000000
const int kBgWhite = 0x8000000
const int kFgColorMask = 0xF00000
const int kBgColorMask = 0xF000000
const int kFontMask = 0xFFF0000

Private Member Functions

 Msg ()


Member Typedef Documentation

typedef int Msg::LogLevel_t
 

Definition at line 19 of file Msg.h.

Referenced by GetLevelCode().


Constructor & Destructor Documentation

Msg::Msg  )  [private]
 


Member Function Documentation

int Msg::GetFormatCode const char *  fmt  )  [static]
 

Definition at line 50 of file Msg.cxx.

Referenced by JobCMsgModule::Format(), and JobCMsgModule::SetDefaultFormat().

00051 {
00052 //======================================================================
00053 // Purpose: Convert a text string to the print level code
00054 //
00055 // Returns: the level code for corresponding to the string
00056 //          -1 if none match
00057 //======================================================================
00058   if (strcasecmp(fmt,"Priority")==0) return Msg::kPriority;
00059   if (strcasecmp(fmt,"Name")==0)     return Msg::kName;
00060   if (strcasecmp(fmt,"Time")==0)     return Msg::kTime;
00061   if (strcasecmp(fmt,"File")==0)     return Msg::kFile;
00062   if (strcasecmp(fmt,"CVSId")==0)    return Msg::kCVSId;
00063   if (strcasecmp(fmt,"Line")==0)     return Msg::kLine;
00064   if (strcasecmp(fmt,"Host")==0)     return Msg::kHost;
00065   if (strcasecmp(fmt,"PID")==0)      return Msg::kPID;
00066   if (strcasecmp(fmt,"RunSnarl")==0) return Msg::kRunSnarl;
00067   if (strcasecmp(fmt,"StackTrace")==0) return Msg::kStackTrace;
00068   
00069   if (strcasecmp(fmt,"ColorAll")==0)   return Msg::kColorAll;  
00070   if (strcasecmp(fmt,"Bold")==0)       return Msg::kBold;
00071   if (strcasecmp(fmt,"Dim")==0)        return Msg::kDim;    
00072   if (strcasecmp(fmt,"Underline")==0)  return Msg::kUnderline;
00073   if (strcasecmp(fmt,"Blink")==0)      return Msg::kBlink;    
00074   if (strcasecmp(fmt,"Reverse")==0)    return Msg::kReverse;  
00075   if (strcasecmp(fmt,"Black")==0)      return Msg::kBlack;    
00076   if (strcasecmp(fmt,"Red")==0)        return Msg::kRed;      
00077   if (strcasecmp(fmt,"Green")==0)      return Msg::kGreen;    
00078   if (strcasecmp(fmt,"Yellow")==0)     return Msg::kYellow;   
00079   if (strcasecmp(fmt,"Blue")==0)       return Msg::kBlue;     
00080   if (strcasecmp(fmt,"Magenta")==0)    return Msg::kMagenta;  
00081   if (strcasecmp(fmt,"Cyan")==0)       return Msg::kCyan;     
00082   if (strcasecmp(fmt,"White")==0)      return Msg::kWhite;    
00083   if (strcasecmp(fmt,"BgBlack")==0)    return Msg::kBgBlack;  
00084   if (strcasecmp(fmt,"BgRed")==0)      return Msg::kBgRed;      
00085   if (strcasecmp(fmt,"BgGreen")==0)    return Msg::kBgGreen;    
00086   if (strcasecmp(fmt,"BgYellow")==0)   return Msg::kBgYellow;   
00087   if (strcasecmp(fmt,"BgBlue")==0)     return Msg::kBgBlue;     
00088   if (strcasecmp(fmt,"BgMagenta")==0)  return Msg::kBgMagenta;  
00089   if (strcasecmp(fmt,"BgCyan")==0)     return Msg::kBgCyan;     
00090   if (strcasecmp(fmt,"BgWhite")==0)    return Msg::kBgWhite;  
00091   return -1;
00092 }

Msg::LogLevel_t Msg::GetLevelCode const char *  level  )  [static]
 

Definition at line 11 of file Msg.cxx.

References LogLevel_t.

Referenced by JobCMsgModule::Attach(), UgliGeometry::BuildNodes(), JobCMsgModule::Format(), main(), FidVol::MsgLevel(), LIAnalysis::PrintGainTableRow(), JobCMsgModule::SetDefaultFormat(), and JobCMsgModule::SetLevel().

00012 {
00013 //======================================================================
00014 // Purpose: Convert a text string to the print level code
00015 //
00016 // Returns: the level code for corresponding to the string
00017 //          -1 if none match
00018 //======================================================================
00019   if      (strcasecmp(level,"Verbose")  == 0) return Msg::kVerbose;
00020   else if (strcasecmp(level,"Debug")    == 0) return Msg::kDebug;
00021   else if (strcasecmp(level,"Info")     == 0) return Msg::kInfo;
00022   else if (strcasecmp(level,"Synopsis") == 0) return Msg::kSynopsis;
00023   else if (strcasecmp(level,"Warning")  == 0) return Msg::kWarning;
00024   else if (strcasecmp(level,"Error")    == 0) return Msg::kError;
00025   else if (strcasecmp(level,"Fatal")    == 0) return Msg::kFatal;
00026   return -1;
00027 }

const char * Msg::LevelAsString int  level  )  [static]
 

Definition at line 31 of file Msg.cxx.

Referenced by FidVol::GetMsgLevel(), and DDSParentServer::Print().

00032 {
00033 //======================================================================
00034 // Purpose: Convert the integer level to the string name it represents
00035 //
00036 // Returns: The level represented by the int
00037 //======================================================================
00038   if (level == Msg::kVerbose)  return "Verbose";
00039   if (level == Msg::kDebug)    return "Debug";
00040   if (level == Msg::kInfo)     return "Info";
00041   if (level == Msg::kSynopsis) return "Synopsis";
00042   if (level == Msg::kWarning)  return "Warning";
00043   if (level == Msg::kError)    return "Error";
00044   if (level == Msg::kFatal)    return "Fatal";
00045   return "Unknown?!";
00046 }


Member Data Documentation

const int Msg::kBgBlack = 0x1000000 [static]
 

Definition at line 61 of file Msg.h.

const int Msg::kBgBlue = 0x5000000 [static]
 

Definition at line 65 of file Msg.h.

const int Msg::kBgColorMask = 0xF000000 [static]
 

Definition at line 72 of file Msg.h.

const int Msg::kBgCyan = 0x7000000 [static]
 

Definition at line 67 of file Msg.h.

const int Msg::kBgGreen = 0x3000000 [static]
 

Definition at line 63 of file Msg.h.

const int Msg::kBgMagenta = 0x6000000 [static]
 

Definition at line 66 of file Msg.h.

const int Msg::kBgRed = 0x2000000 [static]
 

Definition at line 62 of file Msg.h.

const int Msg::kBgWhite = 0x8000000 [static]
 

Definition at line 68 of file Msg.h.

const int Msg::kBgYellow = 0x4000000 [static]
 

Definition at line 64 of file Msg.h.

const int Msg::kBlack = 0x100000 [static]
 

Definition at line 53 of file Msg.h.

const int Msg::kBlink = 0x10000 [static]
 

Definition at line 50 of file Msg.h.

const int Msg::kBlue = 0x500000 [static]
 

Definition at line 57 of file Msg.h.

const int Msg::kBold = 0x2000 [static]
 

Definition at line 47 of file Msg.h.

const int Msg::kColorAll = 0x1000 [static]
 

Definition at line 46 of file Msg.h.

const int Msg::kCVSId = 0x10 [static]
 

Definition at line 37 of file Msg.h.

const int Msg::kCyan = 0x700000 [static]
 

Definition at line 59 of file Msg.h.

const LogLevel_t Msg::kDebug = 1 [static]
 

Definition at line 22 of file Msg.h.

const int Msg::kDim = 0x4000 [static]
 

Definition at line 48 of file Msg.h.

const LogLevel_t Msg::kError = 6 [static]
 

Definition at line 26 of file Msg.h.

const LogLevel_t Msg::kFatal = 7 [static]
 

Definition at line 27 of file Msg.h.

const int Msg::kFgColorMask = 0xF00000 [static]
 

Definition at line 71 of file Msg.h.

const int Msg::kFile = 0x08 [static]
 

Definition at line 36 of file Msg.h.

const int Msg::kFontMask = 0xFFF0000 [static]
 

Definition at line 74 of file Msg.h.

const int Msg::kGreen = 0x300000 [static]
 

Definition at line 55 of file Msg.h.

const int Msg::kHost = 0x40 [static]
 

Definition at line 39 of file Msg.h.

const LogLevel_t Msg::kInfo = 3 [static]
 

Definition at line 24 of file Msg.h.

const int Msg::kLine = 0x20 [static]
 

Definition at line 38 of file Msg.h.

const int Msg::kMagenta = 0x600000 [static]
 

Definition at line 58 of file Msg.h.

const LogLevel_t Msg::kMinLogLevel = 0 [static]
 

Definition at line 20 of file Msg.h.

const int Msg::kName = 0x02 [static]
 

Definition at line 34 of file Msg.h.

const LogLevel_t Msg::kNLogLevel = 8 [static]
 

Definition at line 28 of file Msg.h.

const int Msg::kPID = 0x80 [static]
 

Definition at line 40 of file Msg.h.

const int Msg::kPriority = 0x01 [static]
 

Definition at line 33 of file Msg.h.

const int Msg::kRed = 0x200000 [static]
 

Definition at line 54 of file Msg.h.

const int Msg::kReverse = 0x20000 [static]
 

Definition at line 51 of file Msg.h.

const int Msg::kRunSnarl = 0x100 [static]
 

Definition at line 41 of file Msg.h.

const int Msg::kStackTrace = 0x200 [static]
 

Definition at line 42 of file Msg.h.

const LogLevel_t Msg::kSynopsis = 2 [static]
 

Definition at line 23 of file Msg.h.

const int Msg::kTime = 0x04 [static]
 

Definition at line 35 of file Msg.h.

const int Msg::kUnderline = 0x8000 [static]
 

Definition at line 49 of file Msg.h.

const LogLevel_t Msg::kVerbose = 0 [static]
 

Definition at line 21 of file Msg.h.

const LogLevel_t Msg::kWarning = 5 [static]
 

Definition at line 25 of file Msg.h.

const int Msg::kWhite = 0x800000 [static]
 

Definition at line 60 of file Msg.h.

const int Msg::kYellow = 0x400000 [static]
 

Definition at line 56 of file Msg.h.


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:09:37 2010 for loon by  doxygen 1.3.9.1