SessionFactory.h
Go to the documentation of this file.
1/* -*- C++ -*- */
2
3/****************************************************************************
4** Copyright (c) 2001-2014
5**
6** This file is part of the QuickFIX FIX Engine
7**
8** This file may be distributed under the terms of the quickfixengine.org
9** license as defined by quickfixengine.org and appearing in the file
10** LICENSE included in the packaging of this file.
11**
12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14**
15** See http://www.quickfixengine.org/LICENSE for licensing information.
16**
17** Contact ask@quickfixengine.org if any conditions of this licensing are
18** not clear to you.
19**
20****************************************************************************/
21
22#ifndef FIX_SESSIONFACTORY_H
23#define FIX_SESSIONFACTORY_H
24
25#ifdef _MSC_VER
26#pragma warning( disable : 4503 4355 4786 4290 )
27#endif
28
29#include "Log.h"
30#include "Exceptions.h"
31#include "Dictionary.h"
32
33namespace FIX
34{
35class SessionID;
36class Session;
37class Application;
38class MessageStoreFactory;
39class DataDictionaryProvider;
40
47{
48public:
50 MessageStoreFactory& messageStoreFactory,
51 LogFactory* pLogFactory )
52: m_application( application ),
53 m_messageStoreFactory( messageStoreFactory ),
54 m_pLogFactory( pLogFactory ) {}
55
57
58 Session* create( const SessionID& sessionID,
59 const Dictionary& settings ) throw( ConfigError );
60 void destroy( Session* pSession );
61
62private:
63 typedef std::map < std::string, ptr::shared_ptr<DataDictionary> > Dictionaries;
64
65 ptr::shared_ptr<DataDictionary> createDataDictionary(const SessionID& sessionID,
66 const Dictionary& settings,
67 const std::string& settingsKey) throw(ConfigError);
68
69 void processFixtDataDictionaries(const SessionID& sessionID,
70 const Dictionary& settings,
71 DataDictionaryProvider& provider) throw(ConfigError);
72
73 void processFixDataDictionary(const SessionID& sessionID,
74 const Dictionary& settings,
75 DataDictionaryProvider& provider) throw(ConfigError);
76
77 std::string toApplVerID(const std::string& value);
78
83};
84}
85
86#endif
This interface must be implemented to define what your FIX application does.
Definition Application.h:44
Queries for DataDictionary based on appropriate version of FIX.
For storage and retrieval of key/value pairs.
Definition Dictionary.h:37
This interface must be implemented to create a Log.
Definition Log.h:43
This interface must be implemented to create a MessageStore.
Responsible for creating Session objects.
MessageStoreFactory & m_messageStoreFactory
void processFixtDataDictionaries(const SessionID &sessionID, const Dictionary &settings, DataDictionaryProvider &provider)
Dictionaries m_dictionaries
Application & m_application
LogFactory * m_pLogFactory
void processFixDataDictionary(const SessionID &sessionID, const Dictionary &settings, DataDictionaryProvider &provider)
std::string toApplVerID(const std::string &value)
SessionFactory(Application &application, MessageStoreFactory &messageStoreFactory, LogFactory *pLogFactory)
ptr::shared_ptr< DataDictionary > createDataDictionary(const SessionID &sessionID, const Dictionary &settings, const std::string &settingsKey)
void destroy(Session *pSession)
Session * create(const SessionID &sessionID, const Dictionary &settings)
std::map< std::string, ptr::shared_ptr< DataDictionary > > Dictionaries
Maintains the state and implements the logic of a FIX session.
Definition Session.h:46
Unique session id consists of BeginString, SenderCompID and TargetCompID.
Definition SessionID.h:31
Application is not configured correctly
Definition Exceptions.h:88

Generated on Thu May 22 2025 08:23:50 for QuickFIX by doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2001