-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileAccess.h
More file actions
43 lines (31 loc) · 885 Bytes
/
Copy pathFileAccess.h
File metadata and controls
43 lines (31 loc) · 885 Bytes
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
#include "Stdafx.h"
#include "Product.h"
#ifndef FILEACCESS_H
#define FILEACCESS_H
class FileAccess
{
public:
//Default constructor
FileAccess() {
cout << "Default file constructor running :)" << endl;
}
//Opens the files
FileAccess(int argc, char* argv[]);
//Closes the files
~FileAccess();
//Gets next line from file
/*ADD IN FURTHER EXPLANATINO ACCORDING TO CODING STANDARD*/
bool GetNextLineInv(string &a_invbuf);
bool GetNextLineSales(string &a_salesbuf);
bool ReadInvFile(string &a_buff);
bool ReadSalesFile(string &a_buff);
void WriteToUpdatedInventoryFile();
void WriteToSummaryFile();
private:
ifstream m_invFile; //inventoryfile
ifstream m_salesFile; //sales file
ofstream m_updatedInvFile; //updated inventory file
ofstream m_summaryFile; //summary file
vector<Product> productsList;
};
#endif