FIX::ScreenLogFactory Class Reference

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

#include <Log.h>

Inheritance diagram for FIX::ScreenLogFactory:
Collaboration diagram for FIX::ScreenLogFactory:

Public Member Functions

 ScreenLogFactory (const SessionSettings &settings)
 ScreenLogFactory (bool incoming, bool outgoing, bool event)
Logcreate ()
Logcreate (const SessionID &)
void destroy (Log *log)
Public Member Functions inherited from FIX::LogFactory
virtual ~LogFactory ()

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

◆ ScreenLogFactory() [1/2]

FIX::ScreenLogFactory::ScreenLogFactory ( const SessionSettings & settings)
inline

Definition at line 59 of file Log.h.

60: m_useSettings( true ), m_settings( settings ) {};
SessionSettings m_settings
Definition Log.h:75

References m_settings, and m_useSettings.

◆ ScreenLogFactory() [2/2]

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

Definition at line 61 of file Log.h.

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

References m_event, m_incoming, m_outgoing, and m_useSettings.

Member Function Documentation

◆ create() [1/2]

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

Implements FIX::LogFactory.

Definition at line 32 of file Log.cpp.

33{
34 bool incoming, outgoing, event;
35 init( m_settings.get(), incoming, outgoing, event );
36 return new ScreenLog( incoming, outgoing, event );
37}
void init(const Dictionary &settings, bool &incoming, bool &outgoing, bool &event)
Definition Log.cpp:50

References init(), and m_settings.

◆ create() [2/2]

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

Implements FIX::LogFactory.

Definition at line 39 of file Log.cpp.

40{
41 Dictionary settings;
42 if( m_settings.has(sessionID) )
43 settings = m_settings.get( sessionID );
44
45 bool incoming, outgoing, event;
46 init( settings, incoming, outgoing, event );
47 return new ScreenLog( sessionID, incoming, outgoing, event );
48}

References init(), and m_settings.

◆ destroy()

void FIX::ScreenLogFactory::destroy ( Log * log)
virtual

Implements FIX::LogFactory.

Definition at line 73 of file Log.cpp.

74{
75 delete pLog;
76}

◆ init()

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

Definition at line 50 of file Log.cpp.

51{
52 if( m_useSettings )
53 {
54 incoming = true;
55 outgoing = true;
56 event = true;
57
58 if( settings.has(SCREEN_LOG_SHOW_INCOMING) )
59 incoming = settings.getBool(SCREEN_LOG_SHOW_INCOMING);
60 if( settings.has(SCREEN_LOG_SHOW_OUTGOING) )
61 outgoing = settings.getBool(SCREEN_LOG_SHOW_OUTGOING);
62 if( settings.has(SCREEN_LOG_SHOW_EVENTS) )
63 event = settings.getBool(SCREEN_LOG_SHOW_EVENTS);
64 }
65 else
66 {
67 incoming = m_incoming;
68 outgoing = m_outgoing;
69 event = m_event;
70 }
71}
const char SCREEN_LOG_SHOW_EVENTS[]
const char SCREEN_LOG_SHOW_OUTGOING[]
const char SCREEN_LOG_SHOW_INCOMING[]

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(), and create().

Member Data Documentation

◆ m_event

bool FIX::ScreenLogFactory::m_event
private

Definition at line 73 of file Log.h.

Referenced by init(), and ScreenLogFactory().

◆ m_incoming

bool FIX::ScreenLogFactory::m_incoming
private

Definition at line 71 of file Log.h.

Referenced by init(), and ScreenLogFactory().

◆ m_outgoing

bool FIX::ScreenLogFactory::m_outgoing
private

Definition at line 72 of file Log.h.

Referenced by init(), and ScreenLogFactory().

◆ m_settings

SessionSettings FIX::ScreenLogFactory::m_settings
private

Definition at line 75 of file Log.h.

Referenced by create(), create(), and ScreenLogFactory().

◆ m_useSettings

bool FIX::ScreenLogFactory::m_useSettings
private

Definition at line 74 of file Log.h.

Referenced by init(), ScreenLogFactory(), and ScreenLogFactory().


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

Generated on for QuickFIX by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2001