-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDataIO.h
51 lines (41 loc) · 1.01 KB
/
DataIO.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
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* DataIO.h
*
* Created on: Dec 28, 2017
* Author: ethanyoung
*/
#ifndef DATAIO_H_
#define DATAIO_H_
#include "Stock.h"
#include "Investor.h"
#include "Fund.h"
#include "Config.h"
#include <vector>
#include <string>
#include <fstream>
//extern string defaultFundName;
//Fund inFund;
class DataIO {
public:
DataIO();
DataIO(string stockFilename, string investorFilename, string fundFilename);
void writeDistributionToFile(tm *Date, double *results, std::map<string, Stock> *sl);
void initializeStocksLocal();
void initializeInvestorLocal();
void initializeAllInvestorsLocal();
void exportInvestorsLocal();
void exportStocksLocal();
vector<tm*>* getDates(string filename, char delim);
//Importing the data from computer
Fund * initializeFundLocal();
//Exporting the Data
void exportFundLocal();
virtual ~DataIO();
private:
Fund fund;
string stockFilename;
string investorFilename;
string fundFilename;
ifstream input;
};
#endif /* DATAIO_H_ */