-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWallet.h
More file actions
27 lines (21 loc) · 750 Bytes
/
Wallet.h
File metadata and controls
27 lines (21 loc) · 750 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
#pragma once
#include <string>
#include <map>
#include "OrderBookEntry.h"
class Wallet
{
public:
Wallet();
/** insert currency to the waller */
void insertCurrency(std::string type, double amount);
/** remove currency to the waller */
bool removeCurrency(std::string type, double amount);
/** checks wallets currency this much currency or more */
bool containsCurrency(std::string type, double amount);
/** checks if the wallet can cope with this ask or bid */
bool canFulfillOrder(OrderBookEntry order);
/** generate a string represenation of the waller*/
std::string toString();
private:
std::map<std::string, double> currencies;
};