DataDictionaryProvider.h
Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 /****************************************************************************
00004 ** Copyright (c) 2001-2014
00005 **
00006 ** This file is part of the QuickFIX FIX Engine
00007 **
00008 ** This file may be distributed under the terms of the quickfixengine.org
00009 ** license as defined by quickfixengine.org and appearing in the file
00010 ** LICENSE included in the packaging of this file.
00011 **
00012 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00013 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00014 **
00015 ** See http://www.quickfixengine.org/LICENSE for licensing information.
00016 **
00017 ** Contact ask@quickfixengine.org if any conditions of this licensing are
00018 ** not clear to you.
00019 **
00020 ****************************************************************************/
00021 
00022 #ifndef FIX_DATADICTIONARYPROVIDER_H
00023 #define FIX_DATADICTIONARYPROVIDER_H
00024 
00025 #ifdef _MSC_VER
00026 #pragma warning( disable : 4503 4355 4786 4290 )
00027 #endif
00028 
00029 #include "DataDictionary.h"
00030 #include "Exceptions.h"
00031 #include "Utility.h"
00032 
00033 namespace FIX
00034 {
00035 class BeginString;
00036 class ApplVerID;
00037 
00042 class DataDictionaryProvider
00043 {
00044 public:
00045   DataDictionaryProvider() {}
00046   DataDictionaryProvider( const DataDictionaryProvider& copy );
00047 
00048   const DataDictionary& getSessionDataDictionary(const BeginString& beginString) const
00049   throw( DataDictionaryNotFound );
00050 
00051   const DataDictionary& getApplicationDataDictionary(const ApplVerID& applVerID) const
00052   throw( DataDictionaryNotFound );
00053 
00054   void addTransportDataDictionary(const BeginString& beginString, ptr::shared_ptr<DataDictionary>);
00055   void addApplicationDataDictionary(const ApplVerID& applVerID, ptr::shared_ptr<DataDictionary>);
00056 
00057   void addTransportDataDictionary(const BeginString& beginString, const std::string& path)
00058   { addTransportDataDictionary(beginString, ptr::shared_ptr<DataDictionary>( new DataDictionary(path) )); }
00059   void addApplicationDataDictionary(const ApplVerID& applVerID, const std::string& path)
00060   { addApplicationDataDictionary(applVerID, ptr::shared_ptr<DataDictionary>( new DataDictionary(path) )); }
00061 
00062 private:
00063   std::map<std::string, ptr::shared_ptr<DataDictionary> > m_transportDictionaries;
00064   std::map<std::string, ptr::shared_ptr<DataDictionary> > m_applicationDictionaries;
00065   DataDictionary emptyDataDictionary;
00066 };
00067 }
00068 
00069 #endif //FIX_DATADICTIONARYPROVIDER_H
00070 

Generated on Mon Sep 15 2014 01:23:54 for QuickFIX by doxygen 1.7.6.1 written by Dimitri van Heesch, © 1997-2001