FIX::ScreenLogFactory Class Reference

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

`#include <Log.h>`

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

## Public Member Functions

| ScreenLogFactory (const SessionSettings &settings)
| ScreenLogFactory (bool incoming, bool outgoing, bool event)
Log * | create ()
Log * | create (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.

: m_useSettings( true ), m_settings( settings ) {};
FIX::ScreenLogFactory::m_useSettings
bool m_useSettings
Definition: Log.h:74
FIX::ScreenLogFactory::m_settings
SessionSettings m_settings
Definition: Log.h:75

## ScreenLogFactory() [2/2]

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 ) {}
FIX::ScreenLogFactory::m_incoming
bool m_incoming
Definition: Log.h:71
FIX::ScreenLogFactory::m_event
bool m_event
Definition: Log.h:73
FIX::ScreenLogFactory::m_outgoing
bool m_outgoing
Definition: Log.h:72

## Member Function Documentation

## create() [1/2]

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

virtual

Implements FIX::LogFactory.

Definition at line 32 of file Log.cpp.

{
bool incoming, outgoing, event;
init( m_settings.get(), incoming, outgoing, event );
return new ScreenLog( incoming, outgoing, event );
}
FIX::ScreenLogFactory::init
void init(const Dictionary &settings, bool &incoming, bool &outgoing, bool &event)
Definition: Log.cpp:50
FIX::SessionSettings::get
const Dictionary & get(const SessionID &) const
Get a dictionary for a session.
Definition: SessionSettings.cpp:127

References FIX::SessionSettings::get(), 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.

{
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 );
}
FIX::SessionSettings::has
const bool has(const SessionID &) const
Check if session setings are present.
Definition: SessionSettings.cpp:122

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

## destroy()

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

virtual

Implements FIX::LogFactory.

Definition at line 73 of file Log.cpp.

{
delete pLog;
}

## init()

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

private

Definition at line 50 of file Log.cpp.

{
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;
}
}
FIX::SCREEN_LOG_SHOW_EVENTS
const char SCREEN_LOG_SHOW_EVENTS[]
Definition: SessionSettings.h:100
FIX::SCREEN_LOG_SHOW_OUTGOING
const char SCREEN_LOG_SHOW_OUTGOING[]
Definition: SessionSettings.h:99
FIX::SCREEN_LOG_SHOW_INCOMING
const char SCREEN_LOG_SHOW_INCOMING[]
Definition: SessionSettings.h:98

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

## Member Data Documentation

## m_event

bool FIX::ScreenLogFactory::m_event

private

Definition at line 73 of file Log.h.

Referenced by init().

## m_incoming

bool FIX::ScreenLogFactory::m_incoming

private

Definition at line 71 of file Log.h.

Referenced by init().

## m_outgoing

bool FIX::ScreenLogFactory::m_outgoing

private

Definition at line 72 of file Log.h.

Referenced by init().

## m_settings

SessionSettings FIX::ScreenLogFactory::m_settings

private

Definition at line 75 of file Log.h.

Referenced by create().

## m_useSettings

bool FIX::ScreenLogFactory::m_useSettings

private

Definition at line 74 of file Log.h.

Referenced by init().

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

- Log.h
- Log.cpp