Public Member Functions | Private Member Functions | Private Attributes
FIX::ScreenLogFactory Class Reference

Creates a screen based implementation of Log. More...

#include <Log.h>

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

List of all members.

Public Member Functions

 ScreenLogFactory (const SessionSettings &settings)
 ScreenLogFactory (bool incoming, bool outgoing, bool event)
Logcreate ()
Logcreate (const SessionID &)
void destroy (Log *log)

Private Member Functions

void init (const Dictionary &settings, bool &incoming, bool &outgoing, bool &event)

Private Attributes

bool m_incoming
bool m_outgoing
bool m_event
bool m_useSettings
SessionSettings m_settings

Detailed Description

Creates a screen based implementation of Log.

This displays all log events onto the standard output

Definition at line 56 of file Log.h.


Constructor & Destructor Documentation

Definition at line 59 of file Log.h.

: m_useSettings( true ), m_settings( settings ) {};
FIX::ScreenLogFactory::ScreenLogFactory ( bool  incoming,
bool  outgoing,
bool  event 
) [inline]

Definition at line 61 of file Log.h.

: m_incoming( incoming ), m_outgoing( outgoing ), m_event( event ), m_useSettings( false ) {}

Member Function Documentation

Implements FIX::LogFactory.

Definition at line 32 of file Log.cpp.

References FIX::SessionSettings::get(), init(), and m_settings.

{
  bool incoming, outgoing, event;
  init( m_settings.get(), incoming, outgoing, event );
  return new ScreenLog( incoming, outgoing, event );
}
Log * FIX::ScreenLogFactory::create ( const SessionID sessionID) [virtual]

Implements FIX::LogFactory.

Definition at line 39 of file Log.cpp.

References FIX::SessionSettings::get(), FIX::SessionSettings::has(), init(), and m_settings.

{
  Dictionary settings;
  if( m_settings.has(sessionID) ) 
    settings = m_settings.get( sessionID );

  bool incoming, outgoing, event;
  init( settings, incoming, outgoing, event );
  return new ScreenLog( sessionID, incoming, outgoing, event );
}
void FIX::ScreenLogFactory::destroy ( Log log) [virtual]

Implements FIX::LogFactory.

Definition at line 73 of file Log.cpp.

{
  delete pLog;
}
void FIX::ScreenLogFactory::init ( const Dictionary settings,
bool &  incoming,
bool &  outgoing,
bool &  event 
) [private]

Definition at line 50 of file Log.cpp.

References FIX::Dictionary::getBool(), FIX::Dictionary::has(), m_event, m_incoming, m_outgoing, m_useSettings, FIX::SCREEN_LOG_SHOW_EVENTS, FIX::SCREEN_LOG_SHOW_INCOMING, and FIX::SCREEN_LOG_SHOW_OUTGOING.

Referenced by create().

{  
  if( m_useSettings )
  {
    incoming = true;
    outgoing = true;
    event = true;

    if( settings.has(SCREEN_LOG_SHOW_INCOMING) )
      incoming = settings.getBool(SCREEN_LOG_SHOW_INCOMING);
    if( settings.has(SCREEN_LOG_SHOW_OUTGOING) )
      outgoing = settings.getBool(SCREEN_LOG_SHOW_OUTGOING);
    if( settings.has(SCREEN_LOG_SHOW_EVENTS) )
      event = settings.getBool(SCREEN_LOG_SHOW_EVENTS);
  }
  else
  {
    incoming = m_incoming;
    outgoing = m_outgoing;
    event = m_event;
  }
}

Member Data Documentation

Definition at line 73 of file Log.h.

Referenced by init().

Definition at line 71 of file Log.h.

Referenced by init().

Definition at line 72 of file Log.h.

Referenced by init().

Definition at line 75 of file Log.h.

Referenced by create().

Definition at line 74 of file Log.h.

Referenced by init().


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

Generated on Mon Sep 15 2014 01:23:57 for QuickFIX by doxygen 1.7.6.1 written by Dimitri van Heesch, © 1997-2001