From 2c515f0de70ad675b5f5d25b6a496d67d8dc0463 Mon Sep 17 00:00:00 2001
From: Joel Grunbaum <joelgrun@gmail.com>
Date: Mon, 10 Jan 2022 02:48:19 +0000
Subject: [PATCH] Fixed indentation

---
 json.hpp |  206 +++++++++++++++++++++++++-------------------------
 1 files changed, 103 insertions(+), 103 deletions(-)

diff --git a/json.hpp b/json.hpp
index 19a4b68..adcb147 100644
--- a/json.hpp
+++ b/json.hpp
@@ -11,157 +11,157 @@
 namespace json
 {
 enum MessageTypes {
-    FUTURE_TYPE,
-    SPREAD_TYPE,
-    CALL_TYPE,
-    PUT_TYPE,
-    SETTLEMENT,
-    ADD,
-    ADDED,
-    DELETE,
-    DELETED,
-    REJECT,
-    TRADE,
-    BROKER_REQUEST,
-    BROKER_ACK,
-    BROKER_CONFIRM,
-    NONE
+	FUTURE_TYPE,
+	SPREAD_TYPE,
+	CALL_TYPE,
+	PUT_TYPE,
+	SETTLEMENT,
+	ADD,
+	ADDED,
+	DELETE,
+	DELETED,
+	REJECT,
+	TRADE,
+	BROKER_REQUEST,
+	BROKER_ACK,
+	BROKER_CONFIRM,
+	NONE
 };
 
 enum TradeTypeEnum { BUY_AGGRESSOR, SELL_AGGRESSOR };
 
 struct Message {
-    MessageTypes type;
-    std::string product;
-    Message(MessageTypes type, std::string product);
-    Message();
-    virtual ~Message() = default;
+	MessageTypes type;
+	std::string product;
+	Message(MessageTypes type, std::string product);
+	Message();
+	virtual ~Message() = default;
 };
 
 struct FromExchange : public Message {
-    uint64_t sequence;
-    double timestamp;
-    FromExchange(MessageTypes type, std::string product, uint64_t sequence,
-                 double timestamp);
-    virtual ~FromExchange() = default;
+	uint64_t sequence;
+	double timestamp;
+	FromExchange(MessageTypes type, std::string product, uint64_t sequence,
+	             double timestamp);
+	virtual ~FromExchange() = default;
 };
 
 struct ToExchange : public Message {
-    ToExchange(MessageTypes type, std::string product);
-    virtual ~ToExchange() = default;
+	ToExchange(MessageTypes type, std::string product);
+	virtual ~ToExchange() = default;
 };
 
 struct Broker : public Message {
-    double price;
-    book::OrderSideEnum side;
-    uint64_t volume;
-    std::string counterparty;
-    Broker(MessageTypes type, std::string product, double price,
-           book::OrderSideEnum side, uint64_t volume, std::string counterparty);
-    virtual ~Broker() = default;
+	double price;
+	book::OrderSideEnum side;
+	uint64_t volume;
+	std::string counterparty;
+	Broker(MessageTypes type, std::string product, double price,
+	       book::OrderSideEnum side, uint64_t volume, std::string counterparty);
+	virtual ~Broker() = default;
 };
 
 struct AnnounceMessage : public FromExchange {
-    int stationId;
-    std::string stationName;
-    std::string unit;
-    std::chrono::nanoseconds expiry;
-    double aggFee;
-    double pasFee;
-    double broFee;
+	int stationId;
+	std::string stationName;
+	std::string unit;
+	std::chrono::nanoseconds expiry;
+	double aggFee;
+	double pasFee;
+	double broFee;
 
-    AnnounceMessage(MessageTypes type, std::string product,
-                    int stationId, std::string stationName,
-                    std::string unit, std::chrono::nanoseconds expiry,
-                    double aggFee, double pasFee, double broFee,
-                    uint64_t sequence, double timestamp);
+	AnnounceMessage(MessageTypes type, std::string product, int stationId,
+	                std::string stationName, std::string unit,
+	                std::chrono::nanoseconds expiry, double aggFee,
+	                double pasFee, double broFee, uint64_t sequence,
+	                double timestamp);
 };
 
 struct SettleMessage : public FromExchange {
-    std::string stationName;
-    std::chrono::nanoseconds expiry;
-    double price;
-    SettleMessage(MessageTypes type, std::string product,
-                  std::string stationName, std::chrono::nanoseconds expiry,
-                  double price, uint64_t sequence, double timestamp);
+	std::string stationName;
+	std::chrono::nanoseconds expiry;
+	double price;
+	SettleMessage(MessageTypes type, std::string product,
+	              std::string stationName, std::chrono::nanoseconds expiry,
+	              double price, uint64_t sequence, double timestamp);
 };
 
 struct AddMessage : public ToExchange {
-    double price;
-    book::OrderSideEnum side;
-    uint64_t volume;
-    AddMessage(MessageTypes type, std::string product, double price,
-               book::OrderSideEnum side, uint64_t volume);
-    std::string as_string();
+	double price;
+	book::OrderSideEnum side;
+	uint64_t volume;
+	AddMessage(MessageTypes type, std::string product, double price,
+	           book::OrderSideEnum side, uint64_t volume);
+	std::string as_string();
 };
 
 struct AddedMessage : public FromExchange {
-    std::string id;
-    book::OrderSideEnum side;
-    double price;
-    uint64_t filled;
-    uint64_t resting;
-    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);
+	std::string id;
+	book::OrderSideEnum side;
+	double price;
+	uint64_t filled;
+	uint64_t resting;
+	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);
 };
 
 struct DeleteMessage : public ToExchange {
-    std::string id;
-    DeleteMessage(MessageTypes type, std::string product, std::string id);
-    std::string as_string();
+	std::string id;
+	DeleteMessage(MessageTypes type, std::string product, std::string id);
+	std::string as_string();
 };
 
 struct DeletedMessage : public FromExchange {
-    std::string id;
-    book::OrderSideEnum side;
-    DeletedMessage(MessageTypes type, std::string product, std::string id,
-                   book::OrderSideEnum side, uint64_t sequence,
-                   double timestamp);
+	std::string id;
+	book::OrderSideEnum side;
+	DeletedMessage(MessageTypes type, std::string product, std::string id,
+	               book::OrderSideEnum side, uint64_t sequence,
+	               double timestamp);
 };
 
 struct RejectMessage : public FromExchange {
-    std::string error;
-    RejectMessage(MessageTypes type, std::string product, std::string error,
-                  uint64_t sequence, double timestamp);
+	std::string error;
+	RejectMessage(MessageTypes type, std::string product, std::string error,
+	              uint64_t sequence, double timestamp);
 };
 
 struct TradeMessage : public FromExchange {
-    double price;
-    uint64_t volume;
-    std::string buyer;
-    std::string seller;
-    TradeTypeEnum tradeType;
-    std::string passiveOrder;
-    uint64_t passiveOrderRemaining;
-    TradeMessage(MessageTypes type, std::string product, double price,
-                 uint64_t volume, std::string buyer, std::string seller,
-                 TradeTypeEnum tradeType, std::string passiveOrder,
-                 uint64_t passiveOrderRemaining, uint64_t sequence,
-                 double timestamp);
+	double price;
+	uint64_t volume;
+	std::string buyer;
+	std::string seller;
+	TradeTypeEnum tradeType;
+	std::string passiveOrder;
+	uint64_t passiveOrderRemaining;
+	TradeMessage(MessageTypes type, std::string product, double price,
+	             uint64_t volume, std::string buyer, std::string seller,
+	             TradeTypeEnum tradeType, std::string passiveOrder,
+	             uint64_t passiveOrderRemaining, uint64_t sequence,
+	             double timestamp);
 };
 
 struct BrokerRequest : public Broker {
-    BrokerRequest(MessageTypes type, std::string product, double price,
-                  book::OrderSideEnum side, uint64_t volume,
-                  std::string counterparty);
+	BrokerRequest(MessageTypes type, std::string product, double price,
+	              book::OrderSideEnum side, uint64_t volume,
+	              std::string counterparty);
 };
 
 struct BrokerAck : public Broker {
-    std::string id;
-    std::string brokerTradeStatus;
-    std::string owner;
-    BrokerAck(MessageTypes type, std::string product, double price,
-              book::OrderSideEnum side, uint64_t volume,
-              std::string counterparty, std::string id,
-              std::string brokerTradeStatus, std::string owner);
+	std::string id;
+	std::string brokerTradeStatus;
+	std::string owner;
+	BrokerAck(MessageTypes type, std::string product, double price,
+	          book::OrderSideEnum side, uint64_t volume,
+	          std::string counterparty, std::string id,
+	          std::string brokerTradeStatus, std::string owner);
 };
 
 struct BrokerConfirm : public Broker {
-    std::string id;
-    BrokerConfirm(MessageTypes type, std::string product, double price,
-                  book::OrderSideEnum side, uint64_t volume,
-                  std::string counterparty, std::string id);
+	std::string id;
+	BrokerConfirm(MessageTypes type, std::string product, double price,
+	              book::OrderSideEnum side, uint64_t volume,
+	              std::string counterparty, std::string id);
 };
 
 std::queue<Message*> parse(std::string& str);

--
Gitblit v1.9.3