-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathfix_application.h
More file actions
45 lines (34 loc) · 1.6 KB
/
Copy pathfix_application.h
File metadata and controls
45 lines (34 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (C) Mike Kipnis - DistributedATS
#pragma once
#include <quickfix/SessionSettings.h>
#include <quickfix/SessionFactory.h>
#include <quickfix/NullStore.h>
#include <quickfix/ThreadedSocketInitiator.h>
class Session;
class fix_application : public FIX::Application {
public:
fix_application(const std::weak_ptr<Session>& ws_session) : _ws_session(ws_session) {}
void onCreate(const FIX::SessionID& id) override {
std::cout << "Created: " << id << std::endl;
}
void onLogon(const FIX::SessionID& id) override {
std::cout << "Logon: " << id << std::endl;
}
void onLogout(const FIX::SessionID& id) override {
std::cout << "Logout: " << id << std::endl;
}
void toAdmin(FIX::Message& message, const FIX::SessionID& sessionID) override;
void fromAdmin(const FIX::Message &,
const FIX::SessionID &) throw(FIX::FieldNotFound,
FIX::IncorrectDataFormat,
FIX::IncorrectTagValue,
FIX::RejectLogon) override;
void fromApp(const FIX::Message &message,
const FIX::SessionID &sessionID) throw(FIX::FieldNotFound,
FIX::IncorrectDataFormat,
FIX::IncorrectTagValue,
FIX::UnsupportedMessageType) override;
void toApp(FIX::Message&, const FIX::SessionID&) throw(FIX::DoNotSend) override {};
private:
std::weak_ptr<Session> _ws_session;
};