QuickFIX: FIX::ScreenLog Class Reference

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:
[legend]
Collaboration diagram for FIX::ScreenLog:
[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.

    00119 : m_prefix( "GLOBAL" ),
    00120   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.

    00124 : m_prefix( sessionID.toString() ),
    00125   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.

    00128 {}

void FIX::ScreenLog::clear | ( |  | ) | `[inline, virtual]`

Implements FIX::Log.

Definition at line 127 of file Log.h.

    00127 {}

bool FIX::ScreenLog::getMillisecondsInTimeStamp | ( |  | ) | const`[inline]`

Definition at line 163 of file Log.h.

References m_millisecondsInTimeStamp.

    00164   { return 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().

    00153   {
    00154     if ( !m_event ) return ;
    00155     Locker l( s_mutex );
    00156     m_time.setCurrent();
    00157     std::cout << "<" << UtcTimeStampConvertor::convert(m_time, m_millisecondsInTimeStamp)
    00158               << ", " << m_prefix
    00159               << ", " << "event>" << std::endl
    00160               << "  (" << value << ")" << std::endl;
    00161   }

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().

    00131   {
    00132     if ( !m_incoming ) return ;
    00133     Locker l( s_mutex );
    00134     m_time.setCurrent();
    00135     std::cout << "<" << UtcTimeStampConvertor::convert(m_time, m_millisecondsInTimeStamp)
    00136               << ", " << m_prefix
    00137               << ", " << "incoming>" << std::endl
    00138               << "  (" << value << ")" << std::endl;
    00139   }

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().

    00142   {
    00143     if ( !m_outgoing ) return ;
    00144     Locker l( s_mutex );
    00145     m_time.setCurrent();
    00146     std::cout << "<" << UtcTimeStampConvertor::convert(m_time, m_millisecondsInTimeStamp)
    00147               << ", " << m_prefix
    00148               << ", " << "outgoing>" << std::endl
    00149               << "  (" << value << ")" << std::endl;
    00150   }

void FIX::ScreenLog::setMillisecondsInTimeStamp | ( | bool | value | ) | `[inline]`

Definition at line 165 of file Log.h.

References m_millisecondsInTimeStamp.

    00166   { m_millisecondsInTimeStamp = value; }

## Member Data Documentation

bool FIX::ScreenLog::m_event`[private]`

Definition at line 173 of file Log.h.

Referenced by onEvent().

bool FIX::ScreenLog::m_incoming`[private]`

Definition at line 171 of file Log.h.

Referenced by onIncoming().

bool FIX::ScreenLog::m_millisecondsInTimeStamp`[private]`

Definition at line 175 of file Log.h.

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

bool FIX::ScreenLog::m_outgoing`[private]`

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().

UtcTimeStamp FIX::ScreenLog::m_time`[private]`

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:

- /home/omiller/Development/autobuild/quickfix/src/C++/Log.h
- /home/omiller/Development/autobuild/quickfix/src/C++/Log.cpp