-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
45 lines (37 loc) · 1013 Bytes
/
main.cpp
File metadata and controls
45 lines (37 loc) · 1013 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
// AC-Circuits/main.cpp
// Frederik Brooke Barnes, Last modified 2/5/2021
#include<iostream>
#include<cmath>
#include<vector>
#include<memory>
#include "complex.h"
#include "component.h"
#include "general_component.h"
#include "resistor.h"
#include "capacitor.h"
#include "inductor.h"
#include "circuit.h"
#include "circuit_component.h"
#include "typedefs.h"
#include "menu.h"
#include <typeinfo>
#include <typeindex>
#include<algorithm>
#include "count_type.h"
int main()
{
//Create example components
resistor r1(1);
capacitor c1(1);
inductor l1(1);
//Create library of components with array of base class pointers
library_vector component_library;
component_library.push_back(std::make_shared<resistor>(1));
component_library.push_back(std::make_shared<capacitor>(1));
component_library.push_back(std::make_shared<inductor>(1));
//Create user interface for controlling component library
menu main_menu(component_library);
//Run the menu
main_menu.main_menu();
return 0;
}