generated from Manchas2k4/tc1030-project-market
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorder.h
43 lines (32 loc) · 851 Bytes
/
order.h
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
// =========================================================
// File: order.h
// Author:
// Date:
// Description:
// =========================================================
#ifndef ORDER_H
#define ORDER_H
#include <sstream>
#include <string>
#include <iomanip>
typedef enum {SELLING, BUYING} OrderType;
class Order {
protected:
double amount, price;
int traderId;
OrderType type;
public:
Order(int, double, double, OrderType);
Order(const Order &);
int getTraderId() const;
double getAmount() const;
double getPrice() const;
OrderType getType() const;
double getDollars() const;
bool operator==(const Order*);
bool operator==(const Order&);
std::string toString() const;
virtual bool operator<(const Order*) = 0;
virtual bool operator<(const Order&) = 0;
};
#endif