DataDictionaryProvider.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 ** Copyright (c) 2001-2014
3 **
4 ** This file is part of the QuickFIX FIX Engine
5 **
6 ** This file may be distributed under the terms of the quickfixengine.org
7 ** license as defined by quickfixengine.org and appearing in the file
8 ** LICENSE included in the packaging of this file.
9 **
10 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
11 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
12 **
13 ** See http://www.quickfixengine.org/LICENSE for licensing information.
14 **
15 ** Contact ask@quickfixengine.org if any conditions of this licensing are
16 ** not clear to you.
17 **
18 ****************************************************************************/
19 
20 #ifdef _MSC_VER
21 #include "stdafx.h"
22 #else
23 #include "config.h"
24 #endif
25 
26 #include "DataDictionaryProvider.h"
27 #include "Fields.h"
28 #include "DataDictionary.h"
29 
30 namespace FIX
31 {
33 {
34  *this = copy;
35 }
36 
38 (const BeginString& beginString) const throw( DataDictionaryNotFound )
39 {
40  std::map<std::string, ptr::shared_ptr<DataDictionary> >::const_iterator find =
41  m_transportDictionaries.find(beginString);
42  if( find != m_transportDictionaries.end() )
43  return *find->second;
44 
45  return emptyDataDictionary;
46 }
47 
49 (const ApplVerID& applVerID) const throw( DataDictionaryNotFound )
50 {
51  std::map<std::string, ptr::shared_ptr<DataDictionary> >::const_iterator find =
52  m_applicationDictionaries.find(applVerID);
53  if( find != m_applicationDictionaries.end() )
54  return *find->second;
55 
56  return emptyDataDictionary;
57 }
58 
60 (const BeginString& beginString, ptr::shared_ptr<DataDictionary> pDD)
61 {
62  m_transportDictionaries[beginString.getValue()] = pDD;
63 }
64 
66 (const ApplVerID& applVerID, ptr::shared_ptr<DataDictionary> pDD)
67 {
68  m_applicationDictionaries[applVerID.getValue()] = pDD;
69 }
70 }
71 
const int ApplVerID
std::map< std::string, ptr::shared_ptr< DataDictionary > > m_transportDictionaries
Represents a data dictionary for a version of FIX.
Queries for DataDictionary based on appropriate version of FIX.
DataDictionary not found for BeginString or ApplVerID.
Definition: Exceptions.h:46
void addApplicationDataDictionary(const ApplVerID &applVerID, ptr::shared_ptr< DataDictionary >)
Definition: Acceptor.cpp:34
const DataDictionary & getSessionDataDictionary(const BeginString &beginString) const
std::map< std::string, ptr::shared_ptr< DataDictionary > > m_applicationDictionaries
const DataDictionary & getApplicationDataDictionary(const ApplVerID &applVerID) const
const int BeginString
void addTransportDataDictionary(const BeginString &beginString, ptr::shared_ptr< DataDictionary >)

Generated on Wed Aug 28 2019 14:13:46 for QuickFIX by doxygen 1.8.13 written by Dimitri van Heesch, © 1997-2001