![]() |
00001 /**************************************************************************** 00002 ** Copyright (c) quickfixengine.org All rights reserved. 00003 ** 00004 ** This file is part of the QuickFIX FIX Engine 00005 ** 00006 ** This file may be distributed under the terms of the quickfixengine.org 00007 ** license as defined by quickfixengine.org and appearing in the file 00008 ** LICENSE included in the packaging of this file. 00009 ** 00010 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00011 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00012 ** 00013 ** See http://www.quickfixengine.org/LICENSE for licensing information. 00014 ** 00015 ** Contact ask@quickfixengine.org if any conditions of this licensing are 00016 ** not clear to you. 00017 ** 00018 ****************************************************************************/ 00019 00020 #ifdef _MSC_VER 00021 #include "stdafx.h" 00022 #else 00023 #include "config.h" 00024 #endif 00025 #include "CallStack.h" 00026 00027 #include "DataDictionaryProvider.h" 00028 #include "Fields.h" 00029 #include "DataDictionary.h" 00030 00031 namespace FIX 00032 { 00033 DataDictionaryProvider::DataDictionaryProvider( const DataDictionaryProvider& copy ) 00034 { 00035 *this = copy; 00036 } 00037 00038 const DataDictionary& DataDictionaryProvider::getSessionDataDictionary 00039 (const BeginString& beginString) throw( DataDictionaryNotFound ) 00040 { 00041 std::map<std::string, DataDictionary>::iterator find = 00042 m_transportDictionaries.find(beginString); 00043 if( find != m_transportDictionaries.end() ) 00044 return find->second; 00045 00046 return emptyDataDictionary; 00047 } 00048 00049 const DataDictionary& DataDictionaryProvider::getApplicationDataDictionary 00050 (const ApplVerID& applVerID) throw( DataDictionaryNotFound ) 00051 { 00052 std::map<std::string, DataDictionary>::iterator find = 00053 m_applicationDictionaries.find(applVerID); 00054 if( find != m_applicationDictionaries.end() ) 00055 return find->second; 00056 00057 return emptyDataDictionary; 00058 } 00059 00060 void DataDictionaryProvider::addTransportDataDictionary 00061 (const BeginString& beginString, const DataDictionary& dd) 00062 { 00063 m_transportDictionaries[beginString.getValue()] = dd; 00064 } 00065 00066 void DataDictionaryProvider::addApplicationDataDictionary 00067 (const ApplVerID applVerID, const DataDictionary& dd) 00068 { 00069 m_applicationDictionaries[applVerID.getValue()] = dd; 00070 } 00071 } 00072