DataDictionaryProvider.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* -*- C++ -*- */
  2. /****************************************************************************
  3. ** Copyright (c) 2001-2014
  4. **
  5. ** This file is part of the QuickFIX FIX Engine
  6. **
  7. ** This file may be distributed under the terms of the quickfixengine.org
  8. ** license as defined by quickfixengine.org and appearing in the file
  9. ** LICENSE included in the packaging of this file.
  10. **
  11. ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  12. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  13. **
  14. ** See http://www.quickfixengine.org/LICENSE for licensing information.
  15. **
  16. ** Contact ask@quickfixengine.org if any conditions of this licensing are
  17. ** not clear to you.
  18. **
  19. ****************************************************************************/
  20. #ifndef FIX_DATADICTIONARYPROVIDER_H
  21. #define FIX_DATADICTIONARYPROVIDER_H
  22. #ifdef _MSC_VER
  23. #pragma warning( disable : 4503 4355 4786 4290 )
  24. #endif
  25. #include "DataDictionary.h"
  26. #include "Exceptions.h"
  27. namespace FIX
  28. {
  29. class BeginString;
  30. class ApplVerID;
  31. /**
  32. * Queries for DataDictionary based on appropriate version of %FIX.
  33. */
  34. class DataDictionaryProvider
  35. {
  36. public:
  37. DataDictionaryProvider() {}
  38. DataDictionaryProvider( const DataDictionaryProvider& copy );
  39. const DataDictionary& getSessionDataDictionary(const BeginString& beginString) const
  40. throw( DataDictionaryNotFound );
  41. const DataDictionary& getApplicationDataDictionary(const ApplVerID& applVerID) const
  42. throw( DataDictionaryNotFound );
  43. void addTransportDataDictionary(const BeginString& beginString, const DataDictionary*);
  44. void addApplicationDataDictionary(const ApplVerID& applVerID, const DataDictionary*);
  45. private:
  46. std::map<std::string, const DataDictionary*> m_transportDictionaries;
  47. std::map<std::string, const DataDictionary*> m_applicationDictionaries;
  48. DataDictionary emptyDataDictionary;
  49. };
  50. }
  51. #endif //FIX_DATADICTIONARYPROVIDER_H