CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
zmex::ZMexLogAlways Class Reference

#include <ZMexLogger.h>

+ Inheritance diagram for zmex::ZMexLogAlways:

Public Member Functions

 ZMexLogAlways ()
 
 ZMexLogAlways (std::ostream &os)
 
virtual ~ZMexLogAlways ()
 
virtual ZMexLogAlwaysclone () const
 
virtual ZMexLogResult emit (const ZMexception &x)
 
virtual ZMexLogResult emit (const std::string &s)
 
- Public Member Functions inherited from zmex::ZMexLogBehavior
 ZMexLogBehavior ()
 
virtual ~ZMexLogBehavior ()
 
virtual ZMexLogBehaviorclone () const
 
virtual ZMexLogResult emit (const ZMexception &x)
 
virtual ZMexLogResult emit (const std::string &s)
 
virtual bool isTimeDesired () const
 
virtual bool isFilePathDesired () const
 

Detailed Description

Definition at line 127 of file ZMexLogger.h.

Constructor & Destructor Documentation

◆ ZMexLogAlways() [1/2]

zmex::ZMexLogAlways::ZMexLogAlways ( )

Definition at line 97 of file ZMexLogger.cc.

99, myOs( std::cerr )
100{ ; }

Referenced by clone().

◆ ZMexLogAlways() [2/2]

zmex::ZMexLogAlways::ZMexLogAlways ( std::ostream &  os)

Definition at line 102 of file ZMexLogger.cc.

104, myOs( os )
105{ ; }

◆ ~ZMexLogAlways()

zmex::ZMexLogAlways::~ZMexLogAlways ( )
virtual

Definition at line 107 of file ZMexLogger.cc.

107{ ; }

Member Function Documentation

◆ clone()

ZMexLogAlways * zmex::ZMexLogAlways::clone ( ) const
virtual

Reimplemented from zmex::ZMexLogBehavior.

Definition at line 110 of file ZMexLogger.cc.

110{ return new ZMexLogAlways( *this ); }

◆ emit() [1/2]

ZMexLogResult zmex::ZMexLogAlways::emit ( const std::string &  s)
virtual

Reimplemented from zmex::ZMexLogBehavior.

Definition at line 121 of file ZMexLogger.cc.

123 {
124 //DEBUG cerr << "ZMexLogAlways::emit( \"" << s << "\" )" << endl;
125
126 // Emit the message, flushing the output right away:
127 myOs << s << std::flush;
128 return ZMexLOGGED;
129}
@ ZMexLOGGED
Definition: ZMexLogResult.h:19

◆ emit() [2/2]

ZMexLogResult zmex::ZMexLogAlways::emit ( const ZMexception x)
virtual

Reimplemented from zmex::ZMexLogBehavior.

Definition at line 112 of file ZMexLogger.cc.

112 {
113 std::string s = x.logMessage(); //
114 if ( s != "" )
115 return emit( s );
116
117 x.logObject();
118 return ZMexLOGGED;
119}
virtual ZMexLogResult emit(const ZMexception &x)
Definition: ZMexLogger.cc:112

Referenced by emit().


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