-
Notifications
You must be signed in to change notification settings - Fork 9
/
Order.cpp
77 lines (73 loc) · 1.26 KB
/
Order.cpp
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include "Order.h"
#include <iostream>
Order::Order()
{
}
Order::Order(int a_asset , int a_owner , double a_time , int a_price,
int a_volume , OrderType a_type ,
int a_globalOrderIdentifier)
{
m_asset = a_asset;
m_owner = a_owner;
m_time = a_time;
m_price = a_price;
m_initialVolume = a_volume;
m_volume =a_volume;
m_type = a_type;
m_state = ALIVE;
m_globalOrderIdentifier = a_globalOrderIdentifier;
}
Order::~Order()
{
}
int Order::getUnderlying()
{
return m_asset;
}
int Order::getIdentifier()
{
return m_globalOrderIdentifier;
}
int Order::getOwner()
{
return m_owner;
}
int Order::getVolume()
{
return m_volume;
}
int Order::getInitialVolume()
{
return m_initialVolume;
}
int Order::getPrice()
{
return m_price;
}
OrderType Order::getType()
{
return m_type;
}
double Order::getTime()
{
return m_time;
}
void Order::printOrder()
{
std::cout << m_globalOrderIdentifier << "\t" << m_owner << "\t"
<< m_asset << "\t" << m_type << "\t" << m_state << "\t"
<< m_initialVolume << "\t" << m_volume << "\t" << m_price << "\t"
<< std::endl ;
}
void Order::setPrice(int a_price)
{
m_price = a_price ;
}
void Order::setVolume(int a_volume)
{
m_volume = a_volume ;
}
void Order::setType(OrderType a_type)
{
m_type = a_type ;
}