Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @(#) PropertyHistory.h
- */
- #ifndef PROPERTYHISTORY_H_H
- #define PROPERTYHISTORY_H_H
- #include <iostream>
- #include <string>
- #include <unordered_map>
- #include <vector>
- #include "Coin.h"
- #include "send_recieve.h"
- #include "Transaction.h"
- class PropertyHistory
- {
- private:
- std::unordered_map<std::string, int> cash_history; // std::unordered_map<dateString, cash>
- std::unordered_map<std::string, int> total_value; // std::unordered_map<dateString, cash>
- std::vector<Transaction> transaction_history;
- public:
- PropertyHistory();
- ~PropertyHistory();
- void addTransaction( std::string date, Coin coin, int amount, send_recieve send_recieve );
- std::unordered_map<std::string, int> getCashHistory();
- std::unordered_map<std::string, int> getTotalHistory();
- std::vector<Transaction> getTransactionHistory();
- };
- #endif
- /**
- * @(#) PropertyHistory.cpp
- */
- #include "PropertyHistory.h"
- using std::string;
- using std::vector;
- using std::unordered_map;
- using std::cerr;
- PropertyHistory::PropertyHistory( )
- {
- }
- PropertyHistory::~PropertyHistory( )
- {
- }
- /**
- * Pushes Transaction to vector
- * @param date
- * @param coin
- * @param amount
- * @param sr
- */
- void PropertyHistory::addTransaction( string date, Coin coin, int amount, send_recieve sr )
- {
- this->transaction_history.push_back( Transaction( date, coin, amount sr ))
- }
- vector<coin_historys> PropertyHistory::getCoinHistory( )
- {
- return vector<coin_historys>();
- }
- vector<transaction_history> PropertyHistory::getTransactionHistory( )
- {
- return vector<transaction_history>();
- }
- unordered_map<date, cash> PropertyHistory::getCashHistory( )
- {
- return unordered_map<date, cash>();
- }
- unordered_map<date, total> PropertyHistory::getTotalHistory( )
- {
- return unordered_map<date, total>();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement