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

MsgStream.cxx File Reference

#include "MessageService/MsgStream.h"
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <vector>
#include <unistd.h>
#include "MessageService/MsgFormat.h"
#include "MessageService/MsgOStream.h"
#include "MessageService/MsgOStreamService.h"
#include "MessageService/MsgService.h"
#include "MessageService/MsgTripWire.h"

Go to the source code of this file.

Functions

ostream & operator<< (ostream &os, const MsgStream &s)

Variables

const char kColor_Reset [] = { 0x1B, '[', '0', 'm', 0 }
const char kColor_Bold [] = { 0x1B, '[', '1', 'm', 0 }
const char kColor_Dim [] = { 0x1B, '[', '2', 'm', 0 }
const char kColor_Underline [] = { 0x1B, '[', '3', 'm', 0 }
const char kColor_Blink [] = { 0x1B, '[', '5', 'm', 0 }
const char kColor_Reverse [] = { 0x1B, '[', '7', 'm', 0 }
const char kColor_Black [] = { 0x1B, '[', '3', '0', 'm', 0 }
const char kColor_Red [] = { 0x1B, '[', '3', '1', 'm', 0 }
const char kColor_Green [] = { 0x1B, '[', '3', '2', 'm', 0 }
const char kColor_Yellow [] = { 0x1B, '[', '3', '3', 'm', 0 }
const char kColor_Blue [] = { 0x1B, '[', '3', '4', 'm', 0 }
const char kColor_Magenta [] = { 0x1B, '[', '3', '5', 'm', 0 }
const char kColor_Cyan [] = { 0x1B, '[', '3', '6', 'm', 0 }
const char kColor_White [] = { 0x1B, '[', '3', '7', 'm', 0 }
const char kColor_BgWhite [] = { 0x1B, '[', '4', '0', 'm', 0 }
const char kColor_BgRed [] = { 0x1B, '[', '4', '1', 'm', 0 }
const char kColor_BgGreen [] = { 0x1B, '[', '4', '2', 'm', 0 }
const char kColor_BgYellow [] = { 0x1B, '[', '4', '3', 'm', 0 }
const char kColor_BgBlue [] = { 0x1B, '[', '4', '4', 'm', 0 }
const char kColor_BgMagenta [] = { 0x1B, '[', '4', '5', 'm', 0 }
const char kColor_BgCyan [] = { 0x1B, '[', '4', '6', 'm', 0 }
const char kColor_BgBlack [] = { 0x1B, '[', '4', '7', 'm', 0 }


Function Documentation

ostream& operator<< ostream &  os,
const MsgStream s
 

Definition at line 394 of file MsgStream.cxx.

References MsgStream::fFormat, MsgStream::fLogLevel, MsgStream::fMsgOStream, MsgStream::fName, and s().

00395 {
00396 //======================================================================
00397 // Purpose: Print information about the message stream
00398 //
00399 // Inputs: T - the type of output stream to send the information
00400 //======================================================================
00401   os << "*** MsgStream::" << s.fName
00402      << " LogLevel = " << (int)s.fLogLevel << "\n";
00403   for (int i=0; i<Msg::kNLogLevel; ++i) {
00404     os << "(" << i << ") ";
00405     if (s.fFormat[i]&Msg::kPriority) os << "x"; else os << "-";
00406     if (s.fFormat[i]&Msg::kName)     os << "x"; else os << "-";
00407     if (s.fFormat[i]&Msg::kTime)     os << "x"; else os << "-";
00408     if (s.fFormat[i]&Msg::kFile)     os << "x"; else os << "-";
00409     if (s.fFormat[i]&Msg::kCVSId)    os << "x"; else os << "-";
00410     if (s.fFormat[i]&Msg::kLine)     os << "x"; else os << "-";
00411     if (s.fFormat[i]&Msg::kHost)     os << "x"; else os << "-";
00412     if (s.fFormat[i]&Msg::kPID)      os << "x"; else os << "-";
00413     vector<MsgOStream*>::const_iterator iter(s.fMsgOStream[i].begin());
00414     vector<MsgOStream*>::const_iterator iterEnd(s.fMsgOStream[i].end());
00415     for (; iter != iterEnd; ++iter) {
00416       os << " " << (*iter)->GetName();
00417     }
00418     os << "\n";
00419   }
00420   os << "***\n";
00421   return os;
00422 }


Variable Documentation

const char kColor_BgBlack[] = { 0x1B, '[', '4', '7', 'm', 0 }
 

Definition at line 54 of file MsgStream.cxx.

const char kColor_BgBlue[] = { 0x1B, '[', '4', '4', 'm', 0 }
 

Definition at line 51 of file MsgStream.cxx.

const char kColor_BgCyan[] = { 0x1B, '[', '4', '6', 'm', 0 }
 

Definition at line 53 of file MsgStream.cxx.

const char kColor_BgGreen[] = { 0x1B, '[', '4', '2', 'm', 0 }
 

Definition at line 49 of file MsgStream.cxx.

Referenced by NC::Utility::ReportProgress().

const char kColor_BgMagenta[] = { 0x1B, '[', '4', '5', 'm', 0 }
 

Definition at line 52 of file MsgStream.cxx.

const char kColor_BgRed[] = { 0x1B, '[', '4', '1', 'm', 0 }
 

Definition at line 48 of file MsgStream.cxx.

Referenced by NC::Utility::ReportProgress().

const char kColor_BgWhite[] = { 0x1B, '[', '4', '0', 'm', 0 }
 

Definition at line 47 of file MsgStream.cxx.

const char kColor_BgYellow[] = { 0x1B, '[', '4', '3', 'm', 0 }
 

Definition at line 50 of file MsgStream.cxx.

const char kColor_Black[] = { 0x1B, '[', '3', '0', 'm', 0 }
 

Definition at line 38 of file MsgStream.cxx.

const char kColor_Blink[] = { 0x1B, '[', '5', 'm', 0 }
 

Definition at line 35 of file MsgStream.cxx.

const char kColor_Blue[] = { 0x1B, '[', '3', '4', 'm', 0 }
 

Definition at line 42 of file MsgStream.cxx.

const char kColor_Bold[] = { 0x1B, '[', '1', 'm', 0 }
 

Definition at line 32 of file MsgStream.cxx.

const char kColor_Cyan[] = { 0x1B, '[', '3', '6', 'm', 0 }
 

Definition at line 44 of file MsgStream.cxx.

const char kColor_Dim[] = { 0x1B, '[', '2', 'm', 0 }
 

Definition at line 33 of file MsgStream.cxx.

const char kColor_Green[] = { 0x1B, '[', '3', '2', 'm', 0 }
 

Definition at line 40 of file MsgStream.cxx.

const char kColor_Magenta[] = { 0x1B, '[', '3', '5', 'm', 0 }
 

Definition at line 43 of file MsgStream.cxx.

const char kColor_Red[] = { 0x1B, '[', '3', '1', 'm', 0 }
 

Definition at line 39 of file MsgStream.cxx.

const char kColor_Reset[] = { 0x1B, '[', '0', 'm', 0 }
 

Definition at line 31 of file MsgStream.cxx.

Referenced by NC::Utility::ReportProgress().

const char kColor_Reverse[] = { 0x1B, '[', '7', 'm', 0 }
 

Definition at line 36 of file MsgStream.cxx.

const char kColor_Underline[] = { 0x1B, '[', '3', 'm', 0 }
 

Definition at line 34 of file MsgStream.cxx.

const char kColor_White[] = { 0x1B, '[', '3', '7', 'm', 0 }
 

Definition at line 45 of file MsgStream.cxx.

const char kColor_Yellow[] = { 0x1B, '[', '3', '3', 'm', 0 }
 

Definition at line 41 of file MsgStream.cxx.


Generated on Mon Feb 15 11:08:05 2010 for loon by  doxygen 1.3.9.1