MsgG4OStream Class Reference

Inheritance diagram for MsgG4OStream:
MsgOStream

List of all members.

Public Member Functions

 MsgG4OStream ()
 MsgG4OStream (const char *s)
 ~MsgG4OStream ()
const char * GetName () const
ostream & Os () const
void Close ()

Static Public Member Functions

static MsgOStreamMsgG4OStreamMaker (const char *streamName)

Private Types

enum  EG4StreamType { kG4cout, kG4cerr }
typedef enum
MsgG4OStream::EG4StreamType 
G4Stream_t

Private Attributes

G4Stream_t fG4Stream

Detailed Description

Definition at line 22 of file MsgOStreamServiceValidate.cxx.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
kG4cout 
kG4cerr 

Definition at line 75 of file MsgOStreamServiceValidate.cxx.


Constructor & Destructor Documentation

MsgG4OStream::MsgG4OStream (  )  [inline]

Definition at line 41 of file MsgOStreamServiceValidate.cxx.

Referenced by MsgG4OStreamMaker().

00041 { }

MsgG4OStream::MsgG4OStream ( const char *  s  )  [inline]

Definition at line 42 of file MsgOStreamServiceValidate.cxx.

References fG4Stream, kG4cerr, and kG4cout.

00042                                 { 
00043     if (strcmp(s, "G4cout")==0) {
00044       fG4Stream = kG4cout;
00045       return;
00046     }
00047     if (strcmp(s, "G4cerr")==0) {
00048       fG4Stream = kG4cerr;
00049       return;
00050     }
00051     abort();
00052   }

MsgG4OStream::~MsgG4OStream (  )  [inline]

Definition at line 53 of file MsgOStreamServiceValidate.cxx.

00053 { }


Member Function Documentation

void MsgG4OStream::Close (  )  [inline, virtual]

Reimplemented from MsgOStream.

Definition at line 73 of file MsgOStreamServiceValidate.cxx.

00073 { };

const char* MsgG4OStream::GetName ( void   )  const [inline, virtual]

Implements MsgOStream.

Definition at line 55 of file MsgOStreamServiceValidate.cxx.

References fG4Stream, kG4cerr, and kG4cout.

00055                               { 
00056     switch(fG4Stream) {
00057     case kG4cout: return "G4cout";
00058     case kG4cerr: return "G4cerr";
00059     }
00060     abort();
00061     return 0;
00062   }

static MsgOStream* MsgG4OStream::MsgG4OStreamMaker ( const char *  streamName  )  [inline, static]

Definition at line 32 of file MsgOStreamServiceValidate.cxx.

References MsgG4OStream().

Referenced by MsgG4OStreamRegistrar::MsgG4OStreamRegistrar().

00032                                                                {
00033     if (strcmp(streamName, "G4cout")==0 ||
00034         strcmp(streamName, "G4cerr")==0) {
00035       MsgOStream* s = new MsgG4OStream(streamName);
00036       return s;
00037     }
00038     return 0;
00039   }

ostream& MsgG4OStream::Os (  )  const [inline, virtual]

Implements MsgOStream.

Definition at line 63 of file MsgOStreamServiceValidate.cxx.

References fG4Stream, kG4cerr, and kG4cout.

00063                       { 
00064     switch(fG4Stream) {
00065       // These should be G4cout and G4cerr in the "real deal" but for now
00066       // attach these to cout and cerr
00067     case kG4cout: return cout;
00068     case kG4cerr: return cerr;
00069     }
00070     abort();
00071     return cout;
00072   }


Member Data Documentation

Definition at line 76 of file MsgOStreamServiceValidate.cxx.

Referenced by GetName(), MsgG4OStream(), and Os().


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

Generated on 15 Jul 2018 for loon by  doxygen 1.6.1