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

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

FIX::ScreenLogFactory::ScreenLogFactory ( const SessionSettings settings  )  [inline]

Definition at line 59 of file Log.h.

00060 : m_useSettings( true ), m_settings( settings ) {};

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

Definition at line 61 of file Log.h.

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


Member Function Documentation

Log * FIX::ScreenLogFactory::create ( const SessionID sessionID  )  [virtual]

Implements FIX::LogFactory.

Definition at line 43 of file Log.cpp.

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

00044 { QF_STACK_PUSH(ScreenLogFactory::create)
00045 
00046   Dictionary settings;
00047   if( m_settings.has(sessionID) ) 
00048           settings = m_settings.get( sessionID );
00049 
00050   bool incoming, outgoing, event;
00051   init( settings, incoming, outgoing, event );
00052   return new ScreenLog( sessionID, incoming, outgoing, event );
00053 
00054   QF_STACK_POP
00055 }

Log * FIX::ScreenLogFactory::create (  )  [virtual]

Implements FIX::LogFactory.

Definition at line 33 of file Log.cpp.

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

Referenced by create().

00034 { QF_STACK_PUSH(ScreenLogFactory::create)
00035 
00036   bool incoming, outgoing, event;
00037   init( m_settings.get(), incoming, outgoing, event );
00038   return new ScreenLog( incoming, outgoing, event );
00039 
00040   QF_STACK_POP
00041 }

void FIX::ScreenLogFactory::destroy ( Log log  )  [virtual]

Implements FIX::LogFactory.

Definition at line 83 of file Log.cpp.

References QF_STACK_POP, and QF_STACK_PUSH.

00084 { QF_STACK_PUSH(ScreenLogFactory::destroy)
00085   delete pLog;
00086   QF_STACK_POP
00087 }

void FIX::ScreenLogFactory::init ( const Dictionary settings,
bool &  incoming,
bool &  outgoing,
bool &  event 
) [private]

Definition at line 57 of file Log.cpp.

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

Referenced by create().

00058 { QF_STACK_PUSH(ScreenLogFactory::init)
00059         
00060   if( m_useSettings )
00061   {
00062     incoming = true;
00063     outgoing = true;
00064     event = true;
00065 
00066     if( settings.has(SCREEN_LOG_SHOW_INCOMING) )
00067       incoming = settings.getBool(SCREEN_LOG_SHOW_INCOMING);
00068     if( settings.has(SCREEN_LOG_SHOW_OUTGOING) )
00069       outgoing = settings.getBool(SCREEN_LOG_SHOW_OUTGOING);
00070     if( settings.has(SCREEN_LOG_SHOW_EVENTS) )
00071       event = settings.getBool(SCREEN_LOG_SHOW_EVENTS);
00072   }
00073   else
00074   {
00075         incoming = m_incoming;
00076         outgoing = m_outgoing;
00077         event = m_event;
00078   }
00079 
00080   QF_STACK_POP
00081 }


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 Apr 5 21:00:07 2010 for QuickFIX by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2001