![]() |
![]() |
|
Index
Source Files
Annotated Class List
Alphabetical Class List
Class Hierarchy
Graphical Class Hierarchy
|
||
![]() |
![]() |
#include <FileLog.h>
Inheritance diagram for FIX::FileLogFactory:


Public Member Functions | |
| FileLogFactory (const SessionSettings &settings) | |
| FileLogFactory (const std::string &path) | |
| Log * | create () |
| Log * | create (const SessionID &) |
| void | destroy (Log *log) |
Private Attributes | |
| std::string | m_path |
| SessionSettings | m_settings |
| Log * | m_globalLog |
| int | m_globalLogCount |
This stores all log events into flat files
Definition at line 40 of file FileLog.h.
|
|
Definition at line 43 of file FileLog.h. References m_globalLog, and m_globalLogCount.
00044 : m_settings( settings ), m_globalLog(0), m_globalLogCount(0) {}; |
|
|
Definition at line 45 of file FileLog.h. References m_globalLog, m_globalLogCount, and m_path.
00046 : m_path( path ), m_globalLog(0), m_globalLogCount(0) {}; |
|
|
Implements FIX::LogFactory. Definition at line 54 of file FileLog.cpp. References FIX::FILE_LOG_PATH, FIX::SessionSettings::get(), FIX::Dictionary::getString(), m_path, QF_STACK_POP, and QF_STACK_PUSH.
00055 { QF_STACK_PUSH(FileLogFactory::create)
00056
00057 if ( m_path.size() ) return new FileLog( m_path, s );
00058 std::string path;
00059 Dictionary settings = m_settings.get( s );
00060 path = settings.getString( FILE_LOG_PATH );
00061 return new FileLog( path, s );
00062
00063 QF_STACK_POP
00064 }
|
|
|
Implements FIX::LogFactory. Definition at line 31 of file FileLog.cpp. References FIX::FILE_LOG_PATH, FIX::SessionSettings::get(), FIX::Dictionary::getString(), m_globalLog, m_globalLogCount, m_path, QF_STACK_POP, and QF_STACK_PUSH.
00032 { QF_STACK_PUSH(FileLogFactory::create)
00033
00034 m_globalLogCount++;
00035 if( m_globalLogCount > 1 ) return m_globalLog;
00036
00037 try
00038 {
00039 if ( m_path.size() ) return new FileLog( m_path );
00040 std::string path;
00041 Dictionary settings = m_settings.get();
00042 path = settings.getString( FILE_LOG_PATH );
00043 return m_globalLog = new FileLog( path );
00044 }
00045 catch( ConfigError& )
00046 {
00047 m_globalLogCount--;
00048 throw;
00049 }
00050
00051 QF_STACK_POP
00052 }
|
|
|
Implements FIX::LogFactory. Definition at line 66 of file FileLog.cpp. References m_globalLog, m_globalLogCount, QF_STACK_POP, and QF_STACK_PUSH.
00067 { QF_STACK_PUSH(FileLogFactory::destroy)
00068
00069 if( pLog == m_globalLog )
00070 {
00071 m_globalLogCount--;
00072 if( m_globalLogCount == 0 )
00073 {
00074 delete pLog;
00075 m_globalLogCount = 0;
00076 }
00077 }
00078 else
00079 {
00080 delete pLog;
00081 }
00082
00083 QF_STACK_POP
00084 }
|
|
|
Definition at line 56 of file FileLog.h. Referenced by create(), destroy(), and FileLogFactory(). |
|
|
Definition at line 57 of file FileLog.h. Referenced by create(), destroy(), and FileLogFactory(). |
|
|
Definition at line 54 of file FileLog.h. Referenced by create(), and FileLogFactory(). |
|
|
|
1.3.6-20040222 written by Dimitri van Heesch,
© 1997-2001