From 128c6d51ec8c70e230dc86b100cb887ba3f0378d Mon Sep 17 00:00:00 2001
From: Joel Grunbaum <joelgrun@gmail.com>
Date: Thu, 20 Jan 2022 07:00:50 +0000
Subject: [PATCH] Secrets to macros and c string concat at compile time

---
 json.hpp |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/json.hpp b/json.hpp
index 45bf855..e896869 100644
--- a/json.hpp
+++ b/json.hpp
@@ -82,6 +82,7 @@
 	                std::chrono::nanoseconds expiry, double aggFee,
 	                double pasFee, double broFee, uint64_t sequence,
 	                double timestamp);
+	std::string as_string();
 };
 
 struct SettleMessage : public FromExchange {
@@ -91,6 +92,7 @@
 	SettleMessage(MessageTypes type, std::string product,
 	              std::string stationName, std::chrono::nanoseconds expiry,
 	              double price, uint64_t sequence, double timestamp);
+	std::string as_string();
 };
 
 struct AddMessage : public ToExchange {
@@ -108,9 +110,11 @@
 	double price;
 	uint64_t filled;
 	uint64_t resting;
+	std::string owner;
 	AddedMessage(MessageTypes type, std::string product, std::string id,
 	             book::OrderSideEnum side, double price, uint64_t filled,
-	             uint64_t resting, uint64_t sequence, double timestamp);
+	             uint64_t resting, std::string owner, uint64_t sequence,
+	             double timestamp);
 	std::string as_string();
 };
 
@@ -149,12 +153,14 @@
 	             TradeTypeEnum tradeType, std::string passiveOrder,
 	             uint64_t passiveOrderRemaining, uint64_t sequence,
 	             double timestamp);
+	std::string as_string();
 };
 
 struct BrokerRequest : public Broker {
 	BrokerRequest(MessageTypes type, std::string product, double price,
 	              book::OrderSideEnum side, uint64_t volume,
 	              std::string counterparty);
+	std::string as_string();
 };
 
 struct BrokerAck : public Broker {
@@ -165,6 +171,7 @@
 	          book::OrderSideEnum side, uint64_t volume,
 	          std::string counterparty, std::string id,
 	          std::string brokerTradeStatus, std::string owner);
+	std::string as_string();
 };
 
 struct BrokerConfirm : public Broker {
@@ -172,6 +179,7 @@
 	BrokerConfirm(MessageTypes type, std::string product, double price,
 	              book::OrderSideEnum side, uint64_t volume,
 	              std::string counterparty, std::string id);
+	std::string as_string();
 };
 
 std::queue<Message*> parse(std::string& str);

--
Gitblit v1.9.3