Index  Source Files  Annotated Class List  Alphabetical Class List  Class Hierarchy  Graphical Class Hierarchy   
 

/home/orenmnero/autobuild/quickfix/src/C++/SessionSettings.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 /****************************************************************************
00004 ** Copyright (c) quickfixengine.org  All rights reserved.
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_SESSIONSETTINGS_H
00023 #define FIX_SESSIONSETTINGS_H
00024 
00025 #ifdef _MSC_VER
00026 #pragma warning( disable : 4503 4355 4786 4290 )
00027 #endif
00028 
00029 #include "Dictionary.h"
00030 #include "SessionID.h"
00031 #include "Exceptions.h"
00032 #include <map>
00033 #include <set>
00034 
00035 namespace FIX
00036 {
00037 const char BEGINSTRING[] = "BeginString";
00038 const char SENDERCOMPID[] = "SenderCompID";
00039 const char TARGETCOMPID[] = "TargetCompID";
00040 const char SESSION_QUALIFIER[] = "SessionQualifier";
00041 const char CONNECTION_TYPE[] = "ConnectionType";
00042 const char USE_DATA_DICTIONARY[] = "UseDataDictionary";
00043 const char SEND_RESETSEQNUMFLAG[] = "SendResetSeqNumFlag";
00044 const char DATA_DICTIONARY[] = "DataDictionary";
00045 const char START_TIME[] = "StartTime";
00046 const char END_TIME[] = "EndTime";
00047 const char START_DAY[] = "StartDay";
00048 const char END_DAY[] = "EndDay";
00049 const char CHECK_COMPID[] = "CheckCompID";
00050 const char CHECK_LATENCY[] = "CheckLatency";
00051 const char MAX_LATENCY[] = "MaxLatency";
00052 const char HEARTBTINT[] = "HeartBtInt";
00053 const char SOCKET_ACCEPT_PORT[] = "SocketAcceptPort";
00054 const char SOCKET_REUSE_ADDRESS[] = "SocketReuseAddress";
00055 const char SOCKET_CONNECT_HOST[] = "SocketConnectHost";
00056 const char SOCKET_CONNECT_PORT[] = "SocketConnectPort";
00057 const char SOCKET_NODELAY[] = "SocketNodelay";
00058 const char RECONNECT_INTERVAL[] = "ReconnectInterval";
00059 const char VALIDATE_FIELDS_OUT_OF_ORDER[] = "ValidateFieldsOutOfOrder";
00060 const char VALIDATE_FIELDS_HAVE_VALUES[] = "ValidateFieldsHaveValues";
00061 const char VALIDATE_USER_DEFINED_FIELDS[] = "ValidateUserDefinedFields";
00062 const char LOGON_TIMEOUT[] = "LogonTimeout";
00063 const char LOGOUT_TIMEOUT[] = "LogoutTimeout";
00064 const char FILE_PATH[] = "FilePath";
00065 const char FILE_STORE_PATH[] = "FileStorePath";
00066 const char MYSQL_STORE_USECONNECTIONPOOL[] = "MySQLStoreUseConnectionPool";
00067 const char MYSQL_STORE_DATABASE[] = "MySQLStoreDatabase";
00068 const char MYSQL_STORE_USER[] = "MySQLStoreUser";
00069 const char MYSQL_STORE_PASSWORD[] = "MySQLStorePassword";
00070 const char MYSQL_STORE_HOST[] = "MySQLStoreHost";
00071 const char MYSQL_STORE_PORT[] = "MySQLStorePort";
00072 const char POSTGRESQL_STORE_USECONNECTIONPOOL[] = "PostgreSQLStoreUseConnectionPool";
00073 const char POSTGRESQL_STORE_DATABASE[] = "PostgreSQLStoreDatabase";
00074 const char POSTGRESQL_STORE_USER[] = "PostgreSQLStoreUser";
00075 const char POSTGRESQL_STORE_PASSWORD[] = "PostgreSQLStorePassword";
00076 const char POSTGRESQL_STORE_HOST[] = "PostgreSQLStoreHost";
00077 const char POSTGRESQL_STORE_PORT[] = "PostgreSQLStorePort";
00078 const char ODBC_STORE_USER[] = "OdbcStoreUser";
00079 const char ODBC_STORE_PASSWORD[] = "OdbcStorePassword";
00080 const char ODBC_STORE_CONNECTION_STRING[] = "OdbcStoreConnectionString";
00081 const char FILE_LOG_PATH[] = "FileLogPath";
00082 const char SCREEN_LOG_SHOW_INCOMING[] = "ScreenLogShowIncoming";
00083 const char SCREEN_LOG_SHOW_OUTGOING[] = "ScreenLogShowOutgoing";
00084 const char SCREEN_LOG_SHOW_EVENTS[] = "ScreenLogShowEvents";
00085 const char MYSQL_LOG_USECONNECTIONPOOL[] = "MySQLLogUseConnectionPool";
00086 const char MYSQL_LOG_DATABASE[] = "MySQLLogDatabase";
00087 const char MYSQL_LOG_USER[] = "MySQLLogUser";
00088 const char MYSQL_LOG_PASSWORD[] = "MySQLLogPassword";
00089 const char MYSQL_LOG_HOST[] = "MySQLLogHost";
00090 const char MYSQL_LOG_PORT[] = "MySQLLogPort";
00091 const char POSTGRESQL_LOG_USECONNECTIONPOOL[] = "PostgreSQLLogUseConnectionPool";
00092 const char POSTGRESQL_LOG_DATABASE[] = "PostgreSQLLogDatabase";
00093 const char POSTGRESQL_LOG_USER[] = "PostgreSQLLogUser";
00094 const char POSTGRESQL_LOG_PASSWORD[] = "PostgreSQLLogPassword";
00095 const char POSTGRESQL_LOG_HOST[] = "PostgreSQLLogHost";
00096 const char POSTGRESQL_LOG_PORT[] = "PostgreSQLLogPort";
00097 const char ODBC_LOG_USER[] = "OdbcLogUser";
00098 const char ODBC_LOG_PASSWORD[] = "OdbcLogPassword";
00099 const char ODBC_LOG_CONNECTION_STRING[] = "OdbcLogConnectionString";
00100 const char RESET_ON_LOGON[] = "ResetOnLogon";
00101 const char RESET_ON_LOGOUT[] = "ResetOnLogout";
00102 const char RESET_ON_DISCONNECT[] = "ResetOnDisconnect";
00103 const char REFRESH_ON_LOGON[] = "RefreshOnLogon";
00104 const char MILLISECONDS_IN_TIMESTAMP[] = "MillisecondsInTimeStamp";
00105 
00107 class SessionSettings
00108 {
00109 public:
00110   SessionSettings() {}
00111   SessionSettings( std::istream& stream ) throw( ConfigError );
00112   SessionSettings( const std::string& file ) throw( ConfigError );
00113 
00115   const bool has( const SessionID& ) const;
00116 
00118   const Dictionary& get( const SessionID& ) const throw( ConfigError );
00120   void set( const SessionID&, Dictionary ) throw( ConfigError );
00121 
00123   const Dictionary& get() const { return m_defaults; }
00125   void set( const Dictionary& defaults ) throw( ConfigError );
00126 
00128   int size() { return m_settings.size(); }
00129 
00130   typedef std::map < SessionID, Dictionary > Dictionaries;
00131   std::set < SessionID > getSessions() const;
00132 
00133 private:
00134   void validate( const Dictionary& ) const throw( ConfigError );
00135 
00136   Dictionaries m_settings;
00137   Dictionary m_defaults;
00138 };
00141 std::istream& operator>>( std::istream&, SessionSettings& )
00142 throw( ConfigError );
00143 }
00144 
00145 #endif //FIX_SESSIONSETTINGS_H

Generated on Mon Jul 24 19:36:30 2006 for QuickFIX by doxygen 1.3.6-20040222 written by Dimitri van Heesch, © 1997-2001