-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStoreSimulation.cpp
More file actions
64 lines (44 loc) · 1.34 KB
/
Copy pathStoreSimulation.cpp
File metadata and controls
64 lines (44 loc) · 1.34 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
#include "StoreSimulation.h"
StoreSimulation::StoreSimulation(int argc, char* argv[]){
store = new FileAccess(argc, argv);
}
StoreSimulation::~StoreSimulation()
{
}
/**/
/*
StoreSimulation::PassI() StoreSimulation::PassI()
NAME
StoreSimulation::PassI - runs the new file access class
SYNOPSIS
void StoreSimulation::PassI(int a_argc, char* a_argv[]);
a_argc --> the count of the number of command line arguments.
a_argv[] --> the array of command line arguments.
DESCRIPTION
This function maintains the flow of the program by calling
the necessary functions in the correct order from
the file access class. This includes reading and properly storing
the information from both the Inventory and Sales files
and then writing the necessary information to the Summary
and Updated Inventory files.
RETURNS
Return type is void.
AUTHOR
Rachael Chertok
DATE
4:27pm 12/19/2017
*/
/**/
void
StoreSimulation::PassI(int a_argc, char* a_argv[]) {
string m_buff;
while (store->ReadInvFile(m_buff) == true) {
//We want to continue reading while there are lines left to read
}
while (store->ReadSalesFile(m_buff) == true) {
//We want to continue reading while there are lines left to read
}
store->WriteToSummaryFile();
store->WriteToUpdatedInventoryFile();
return;
}