#include <MsgStandardOStream.h>
Inheritance diagram for MsgStandardOStream:

Public Member Functions | |
| MsgStandardOStream () | |
| MsgStandardOStream (const char *name) | |
| ~MsgStandardOStream () | |
| const char * | GetName () const |
| std::ostream & | Os () const |
| void | Close () |
Private Types | |
| typedef enum MsgStandardOStream::EStdOStream | StdOStream_t |
| enum | EStdOStream { kUnknownOStream = 0, kCout = 1, kCerr = 2, kClog = 3 } |
Private Attributes | |
| StdOStream_t | kStream |
|
|
|
|
|
Definition at line 28 of file MsgStandardOStream.h. 00028 {
00029 kUnknownOStream = 0,
00030 kCout = 1,
00031 kCerr = 2,
00032 kClog = 3
00033 } StdOStream_t;
|
|
|
Definition at line 19 of file MsgStandardOStream.h. 00019 { }
|
|
|
Definition at line 17 of file MsgStandardOStream.cxx. References kStream. 00018 {
00019 //======================================================================
00020 // Purpose: Create one of the standatd output streams given its name
00021 //
00022 // Inputs: name - the name of the standard stream
00023 //======================================================================
00024 if (strcmp(name,"cout") == 0) { kStream = kCout; return; }
00025 if (strcmp(name,"cerr") == 0) { kStream = kCerr; return; }
00026 if (strcmp(name,"clog") == 0) { kStream = kClog; return; }
00027 abort();
00028 }
|
|
|
Definition at line 21 of file MsgStandardOStream.h. 00021 { }
|
|
|
Reimplemented from MsgOStream. Definition at line 26 of file MsgStandardOStream.h. Referenced by MsgOStreamServiceValidate::TestMsgStandardOStream(). 00026 { }
|
|
|
Implements MsgOStream. Definition at line 32 of file MsgStandardOStream.cxx. References kCerr, kClog, and kCout. Referenced by MsgOStreamServiceValidate::TestMsgStandardOStream(). 00033 {
00034 //======================================================================
00035 // Purpose: Return the name of this output stream
00036 //
00037 // Returns: The name of the output stream
00038 //======================================================================
00039 switch (kStream) {
00040 case kCout: return "cout"; // break;
00041 case kCerr: return "cerr"; // break;
00042 case kClog: return "clog"; // break;
00043 default: abort();
00044 }
00045 return ""; // Should never get here but this keeps compliers happy
00046 }
|
|
|
Implements MsgOStream. Definition at line 50 of file MsgStandardOStream.cxx. References kCerr, kClog, and kCout. Referenced by MsgOStreamServiceValidate::TestMsgStandardOStream(). 00051 {
00052 //======================================================================
00053 // Purpose: Return the output stream connected to this stream
00054 //
00055 // Returns: the output stream connected to this stream
00056 //======================================================================
00057 switch (kStream) {
00058 case kCout: return std::cout; // break;
00059 case kCerr: return std::cerr; // break;
00060 case kClog: return std::clog; // break;
00061 default: abort(); break;
00062 }
00063 return std::cerr; // Should never get here but this keep compliers happy
00064 }
|
|
|
Definition at line 35 of file MsgStandardOStream.h. Referenced by MsgStandardOStream(). |
1.3.9.1