00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #if !defined(__ONIXS_ENGINE_H__)
00021 #define __ONIXS_ENGINE_H__
00022
00023 #include <string>
00024
00025 #include "OnixS/FIX/ABI.h"
00026 #include "OnixS/FIX/Timestamp.h"
00027
00028 namespace OnixS
00029 {
00030 namespace FIX
00031 {
00032 ONIXS_FIXENGINE_API_DECL(class, IEngineListener);
00033 ONIXS_FIXENGINE_API_DECL(class, EngineSettings);
00034
00036 class ONIXS_FIXENGINE_API Engine
00037 {
00038 public:
00044 static Engine* init(int listenPort = 0);
00045
00049 static Engine* init(const std::string& configFile);
00050
00054 static Engine* initFromString(const std::string& configuration);
00055
00059 static Engine* init(const EngineSettings& settings);
00060
00062 static void shutdown();
00063
00067 static Engine* instance();
00068
00070 static bool isInitialized();
00071
00075 int getListenPort() const;
00076
00080 const std::string& getLogDirectory() const;
00081
00083 Timestamp getLicenseExpirationDate() const;
00084
00087 void registerListener(IEngineListener* listener);
00088
00090 void unregisterListener();
00091
00092 struct Impl;
00093
00094 private:
00095 static void commonInit();
00096
00097 Engine();
00098
00099 ~Engine();
00100
00101 Impl* impl_;
00102
00103 static Engine* instance_;
00104
00105 friend class Message;
00106 };
00107 }
00108 }
00109
00110 #endif // __ONIXS_ENGINE_H__