Advertisement
Guest User

a

a guest
Jan 20th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.82 KB | None | 0 0
  1. /**
  2.  * @(#) PropertyHistory.h
  3.  */
  4.  
  5. #ifndef PROPERTYHISTORY_H_H
  6. #define PROPERTYHISTORY_H_H
  7.  
  8. #include <iostream>
  9. #include <string>
  10. #include <unordered_map>
  11. #include <vector>
  12.  
  13. #include "Coin.h"
  14. #include "send_recieve.h"
  15. #include "Transaction.h"
  16.  
  17. class PropertyHistory
  18. {
  19.  
  20.     private:
  21.         std::unordered_map<std::string, int> cash_history; // std::unordered_map<dateString, cash>
  22.         std::unordered_map<std::string, int> total_value; // std::unordered_map<dateString, cash>
  23.  
  24.         std::vector<Transaction> transaction_history;
  25.  
  26.     public:
  27.         PropertyHistory();
  28.         ~PropertyHistory();
  29.  
  30.         void addTransaction( std::string date, Coin coin, int amount, send_recieve send_recieve );
  31.  
  32.         std::unordered_map<std::string, int> getCashHistory();
  33.         std::unordered_map<std::string, int> getTotalHistory();
  34.  
  35.         std::vector<Transaction> getTransactionHistory();
  36.  
  37. };
  38.  
  39. #endif
  40.  
  41.  
  42. /**
  43.  * @(#) PropertyHistory.cpp
  44.  */
  45.  
  46. #include "PropertyHistory.h"
  47.  
  48. using std::string;
  49. using std::vector;
  50. using std::unordered_map;
  51. using std::cerr;
  52.  
  53. PropertyHistory::PropertyHistory( )
  54. {
  55.  
  56. }
  57.  
  58. PropertyHistory::~PropertyHistory( )
  59. {
  60.    
  61. }
  62.  
  63. /**
  64.  * Pushes Transaction to vector
  65.  * @param date
  66.  * @param coin
  67.  * @param amount
  68.  * @param sr
  69.  */
  70. void PropertyHistory::addTransaction( string date, Coin coin, int amount, send_recieve sr )
  71. {
  72.     this->transaction_history.push_back( Transaction( date, coin, amount sr ))
  73. }
  74.  
  75. vector<coin_historys> PropertyHistory::getCoinHistory( )
  76. {
  77.     return vector<coin_historys>();
  78. }
  79.  
  80. vector<transaction_history> PropertyHistory::getTransactionHistory( )
  81. {
  82.     return vector<transaction_history>();
  83. }
  84.  
  85. unordered_map<date, cash> PropertyHistory::getCashHistory( )
  86. {
  87.     return unordered_map<date, cash>();
  88. }
  89.  
  90. unordered_map<date, total> PropertyHistory::getTotalHistory( )
  91. {
  92.     return unordered_map<date, total>();
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement