forked from Tzadiko/Orderbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrderModify.h
More file actions
31 lines (25 loc) · 714 Bytes
/
Copy pathOrderModify.h
File metadata and controls
31 lines (25 loc) · 714 Bytes
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
#pragma once
#include "Order.h"
class OrderModify
{
public:
OrderModify(OrderId orderId, Side side, Price price, Quantity quantity)
: orderId_{ orderId }
, price_{ price }
, side_{ side }
, quantity_{ quantity }
{ }
OrderId GetOrderId() const { return orderId_; }
Price GetPrice() const { return price_; }
Side GetSide() const { return side_; }
Quantity GetQuantity() const { return quantity_; }
OrderPointer ToOrderPointer(OrderType type) const
{
return std::make_shared<Order>(type, GetOrderId(), GetSide(), GetPrice(), GetQuantity());
}
private:
OrderId orderId_;
Price price_;
Side side_;
Quantity quantity_;
};