Public Member Functions | Private Attributes | Static Private Attributes
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 backup ()
void onIncoming (const std::string &value)
void onOutgoing (const std::string &value)
void onEvent (const std::string &value)
bool getMillisecondsInTimeStamp () const
void setMillisecondsInTimeStamp (bool value)

Private Attributes

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

Static Private Attributes

static Mutex s_mutex

Detailed Description

Screen based implementation of Log.

This will display all log information onto the standard output

Definition at line 115 of file Log.h.


Constructor & Destructor Documentation

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

Definition at line 118 of file Log.h.

: m_prefix( "GLOBAL" ),
  m_incoming( incoming ), m_outgoing( outgoing ), m_event( event ), m_millisecondsInTimeStamp( true ) {}
FIX::ScreenLog::ScreenLog ( const SessionID sessionID,
bool  incoming,
bool  outgoing,
bool  event 
) [inline]

Definition at line 122 of file Log.h.

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

Member Function Documentation

void FIX::ScreenLog::backup ( ) [inline, virtual]

Implements FIX::Log.

Definition at line 128 of file Log.h.

{}
void FIX::ScreenLog::clear ( ) [inline, virtual]

Implements FIX::Log.

Definition at line 127 of file Log.h.

{}

Definition at line 163 of file Log.h.

References m_millisecondsInTimeStamp.

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

Implements FIX::Log.

Definition at line 152 of file Log.h.

References FIX::UtcTimeStampConvertor::convert(), m_event, m_millisecondsInTimeStamp, m_prefix, m_time, s_mutex, and FIX::UtcTimeStamp::setCurrent().

  {
    if ( !m_event ) return ;
    Locker l( s_mutex );
    m_time.setCurrent();
    std::cout << "<" << UtcTimeStampConvertor::convert(m_time, m_millisecondsInTimeStamp)
              << ", " << m_prefix
              << ", " << "event>" << std::endl
              << "  (" << value << ")" << std::endl;
  }
void FIX::ScreenLog::onIncoming ( const std::string &  value) [inline, virtual]

Implements FIX::Log.

Definition at line 130 of file Log.h.

References FIX::UtcTimeStampConvertor::convert(), m_incoming, m_millisecondsInTimeStamp, m_prefix, m_time, s_mutex, and FIX::UtcTimeStamp::setCurrent().

  {
    if ( !m_incoming ) return ;
    Locker l( s_mutex );
    m_time.setCurrent();
    std::cout << "<" << UtcTimeStampConvertor::convert(m_time, m_millisecondsInTimeStamp)
              << ", " << m_prefix
              << ", " << "incoming>" << std::endl
              << "  (" << value << ")" << std::endl;
  }
void FIX::ScreenLog::onOutgoing ( const std::string &  value) [inline, virtual]

Implements FIX::Log.

Definition at line 141 of file Log.h.

References FIX::UtcTimeStampConvertor::convert(), m_millisecondsInTimeStamp, m_outgoing, m_prefix, m_time, s_mutex, and FIX::UtcTimeStamp::setCurrent().

  {
    if ( !m_outgoing ) return ;
    Locker l( s_mutex );
    m_time.setCurrent();
    std::cout << "<" << UtcTimeStampConvertor::convert(m_time, m_millisecondsInTimeStamp)
              << ", " << m_prefix
              << ", " << "outgoing>" << std::endl
              << "  (" << value << ")" << std::endl;
  }
void FIX::ScreenLog::setMillisecondsInTimeStamp ( bool  value) [inline]

Definition at line 165 of file Log.h.

References m_millisecondsInTimeStamp.


Member Data Documentation

bool FIX::ScreenLog::m_event [private]

Definition at line 173 of file Log.h.

Referenced by onEvent().

Definition at line 171 of file Log.h.

Referenced by onIncoming().

Definition at line 172 of file Log.h.

Referenced by onOutgoing().

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

Definition at line 169 of file Log.h.

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

Definition at line 170 of file Log.h.

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

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

Definition at line 174 of file Log.h.

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


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

Generated on Mon Jun 23 2014 23:49:39 for QuickFIX by doxygen 1.7.6.1 written by Dimitri van Heesch, © 1997-2001