-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain2.cpp
More file actions
92 lines (83 loc) · 3.48 KB
/
main2.cpp
File metadata and controls
92 lines (83 loc) · 3.48 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// #include <bits/stdc++.h>
#include "src/include/UserLib/Corporation.h"
#include "src/include/UserLib/ValidateRegex.h"
#include "src/include/DSA/HashMap.h"
#include "src/include/UserInteractions/MakeCorporation.h"
using namespace std;
void processing_information(string line);
void processing_the_department(string line);
HashMap<std::string, Corporation> list_of_corporation = HashMap<std::string, Corporation>();
int main()
{
// Corporation corporation = makeCorporationFromFile("employees.txt");
// cout << "Company size: " << corporation.getCompanyList().getAmountValueOccupy() << endl;
// HashMap<std::string, Company> companies = corporation.getCompanyList();
// Company company = companies.retrieve("BKEntertainment");
// cout << "After retrieve: " << company.getDepartmentList() << endl;
// HashMap<std::string, int> hashMap = HashMap<std::string, int>();
// hashMap.assign("Alex", 100);
// decltype(hashMap) hashMap2 = hashMap;
// std::cout << hashMap2.retrieve("Alex") << std::endl;
int num1 = 10;
int num2 = 20;
Queue<int*> nums = {&num1, &num2};
std::cout << nums << std::endl;
}
// void processing_information(string line)
// {
// regex pattern("(.[^;]+);\\s(.[^;]+);\\s(.[^;]+);\\s(.[^;]+);\\s(.[^;]+);\\s(.[^;]+);\\s(.[^;]+);\\s(.[^;]+);\\s(.[^;]+){0,1};\\s");
// smatch list_of_data;
// if (regex_search(line, list_of_data, pattern))
// {
// processing_the_department(list_of_data[3]);
// std::cout << endl;
// }
// }
// void processing_the_department(string line)
// {
// if (validateCorporationNameFromFile(line))
// {
// regex pattern("([A-Z]{3}[a-z]+)");
// smatch list_of_data;
// if (regex_search(line, list_of_data, pattern))
// {
// // std::cout << "Corporation: " << list_of_data[1] << endl;
// // CREATE CORPORATION
// Corporation corporation = Corporation();
// corporation.setName(list_of_data[1]);
// list_of_corporation.assign(corporation.getName(), corporation);
// }
// }
// else if (validateCompanyNameFromFile(line))
// {
// regex pattern("([A-Z]{3}[a-z]+)->([A-Z]{3}[a-z]+)");
// smatch list_of_data;
// if (regex_search(line, list_of_data, pattern))
// {
// // CREATE CORPORATION
// // std::cout << "Corporation: " << list_of_data[1] << endl;
// // CREATE COMPANY
// // std::cout << "Company: " << list_of_data[2] << endl;
// Company company = Company(list_of_data[2]);
// list_of_corporation[list_of_data[1]].addCompany(company);
// }
// }
// else if (validateDepartmentNameFromFile(line))
// {
// regex pattern("([A-Z]{3}[a-z]+)->([A-Z]{3}[a-z]+)->([A-Z]{3}[a-z]+)");
// smatch list_of_data;
// if (regex_search(line, list_of_data, pattern))
// {
// // std::cout << "Corporation: " << list_of_data[1] << endl;
// // std::cout << "Company: " << list_of_data[2] << endl;
// // std::cout << "Department: " << list_of_data[3] << endl;
// // CREATE CORPORATION
// Company company = Company();
// company.setName(list_of_data[2]);
// Department department = Department();
// department.setName(list_of_data[3]);
// company.addDepartment(department);
// list_of_corporation[list_of_data[1]].addCompany(company);
// }
// }
// }