Add Initial commit to integrate to the main app enterAsk

This commit is contained in:
Lev
2021-06-12 22:19:11 -05:00
parent 279051e997
commit ae736454ec
13 changed files with 4355 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#pragma once
#include <string>
#include <map>
#include "OrderBookEntry.h"
class Wallet
{
public:
Wallet();
/** insert currency to the wallet */
void insertCurrency(std::string type, double amount);
/** remove currency from the wallet */
bool removeCurrency(std::string type, double amount);
/** check if the wallet contains at least this much currency */
bool containsCurrency(std::string type, double amount);
/** check if the wallet can cope with the ask or bid */
bool canFulfillOrder(OrderBookEntry order);
/** generate a string representation of the wallet */
std::string toString();
private:
std::map<std::string, double> currencies;
};