-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWallet.h
38 lines (31 loc) · 844 Bytes
/
Wallet.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
#ifndef WALLET_H
#define WALLET_H
#include <memory>
#include <vector>
#include <string>
#include "Transaction.h"
using namespace std;
const unsigned int MAX_WALLET_NAME_LENGTH = 20U;
class Wallet {
public:
Wallet();
Wallet(unsigned int address, unsigned int coins, string name, Transaction* transactionHistory, unsigned int historySize);
~Wallet();
//getters
unsigned int getAddress();
unsigned int getCoins();
string getName() const;
vector<Transaction> getTransactionHistory();
//setter
void setAddress(unsigned int address);
void setCoins(unsigned int coins);
void setName(char* name);
void addTransactionToHistory(Transaction transaction);
private:
unsigned int address;
unsigned int coins;
string name;
vector<Transaction> transactionHistory;
void applyTransaction(Transaction transaction);
};
#endif // !WALLET_H