Index  Source Files  Annotated Class List  Alphabetical Class List  Class Hierarchy  Graphical Class Hierarchy   
 

FIX::ScreenLog Class Reference

Screen based implementation of Log. More...

#include <Log.h>

Inheritance diagram for FIX::ScreenLog:

Inheritance graph
[legend]
Collaboration diagram for FIX::ScreenLog:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ScreenLog (bool incoming, bool outgoing, bool event)
 ScreenLog (const SessionID &sessionID, bool incoming, bool outgoing, bool event)
void clear ()
void onIncoming (const std::string &value)
void onOutgoing (const std::string &value)
void onEvent (const std::string &value)

Private Attributes

std::string m_prefix
UtcTimeStamp m_time
bool m_incoming
bool m_outgoing
bool m_event

Static Private Attributes

Mutex s_mutex

Detailed Description

Screen based implementation of Log.

This will display all log information onto the standard output

Definition at line 98 of file Log.h.


Constructor & Destructor Documentation

FIX::ScreenLog::ScreenLog bool  incoming,
bool  outgoing,
bool  event
[inline]
 

Definition at line 101 of file Log.h.

References m_prefix.

00102 : m_prefix( "GLOBAL" ),
00103   m_incoming( incoming ), m_outgoing( outgoing ), m_event( event ) {}

FIX::ScreenLog::ScreenLog const SessionID sessionID,
bool  incoming,
bool  outgoing,
bool  event
[inline]
 

Definition at line 105 of file Log.h.

References m_prefix.

00107 : m_prefix( sessionID.toString() ),
00108   m_incoming( incoming ), m_outgoing( outgoing ), m_event( event ) {}


Member Function Documentation

void FIX::ScreenLog::clear  )  [inline, virtual]
 

Implements FIX::Log.

Definition at line 110 of file Log.h.

00110 {}

void FIX::ScreenLog::onEvent const std::string &  value  )  [inline, virtual]
 

Implements FIX::Log.

Definition at line 133 of file Log.h.

References m_prefix, and FIX::UtcTimeStamp::setCurrent().

00134   {
00135     if ( !m_event ) return ;
00136     Locker l( s_mutex );
00137     m_time.setCurrent();
00138     std::cout << "<" << UtcTimeStampConvertor::convert(m_time)
00139               << ", " << m_prefix
00140               << ", " << "event>" << std::endl
00141               << "  (" << value << ")" << std::endl;
00142   }

void FIX::ScreenLog::onIncoming const std::string &  value  )  [inline, virtual]
 

Implements FIX::Log.

Definition at line 112 of file Log.h.

References m_prefix, and FIX::UtcTimeStamp::setCurrent().

00113   {
00114     if ( !m_incoming ) return ;
00115     Locker l( s_mutex );
00116     m_time.setCurrent();
00117     std::cout << "<" << UtcTimeStampConvertor::convert(m_time)
00118               << ", " << m_prefix
00119               << ", " << "incoming>" << std::endl
00120               << "  (" << value << ")" << std::endl;
00121   }

void FIX::ScreenLog::onOutgoing const std::string &  value  )  [inline, virtual]
 

Implements FIX::Log.

Definition at line 123 of file Log.h.

References m_prefix, and FIX::UtcTimeStamp::setCurrent().

00124   {
00125     if ( !m_outgoing ) return ;
00126     Locker l( s_mutex );
00127     m_time.setCurrent();
00128     std::cout << "<" << UtcTimeStampConvertor::convert(m_time)
00129               << ", " << m_prefix
00130               << ", " << "outgoing>" << std::endl
00131               << "  (" << value << ")" << std::endl;
00132   }


Member Data Documentation

bool FIX::ScreenLog::m_event [private]
 

Definition at line 149 of file Log.h.

bool FIX::ScreenLog::m_incoming [private]
 

Definition at line 147 of file Log.h.

bool FIX::ScreenLog::m_outgoing [private]
 

Definition at line 148 of file Log.h.

std::string FIX::ScreenLog::m_prefix [private]
 

Definition at line 145 of file Log.h.

Referenced by onEvent(), onIncoming(), onOutgoing(), and ScreenLog().

UtcTimeStamp FIX::ScreenLog::m_time [private]
 

Definition at line 146 of file Log.h.

Mutex FIX::ScreenLog::s_mutex [static, private]
 

Definition at line 31 of file Log.cpp.


The documentation for this class was generated from the following files:
Generated on Mon Jul 24 19:36:46 2006 for QuickFIX by doxygen 1.3.6-20040222 written by Dimitri van Heesch, © 1997-2001