-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFire.cpp
More file actions
40 lines (29 loc) · 887 Bytes
/
Copy pathFire.cpp
File metadata and controls
40 lines (29 loc) · 887 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
#include "Fire.h"
using namespace std;
Fire::Fire(string theName, string theDate,string theLocation,double TheLatitude,double TheLongitude,string TheDescription):name(theName), date(theDate),location(theLocation),latitude(TheLatitude),longitude(TheLongitude),description(TheDescription) {
}
string Fire::get_name() {
return name;
}
void Fire::add_mission(Mission newMission){
missions.push_back(newMission);
}
vector<Mission> Fire::get_missions(){
return missions;
}
json Fire::get_json(){
json j;
j["name"] = name;
j["date"] = date;
j["location"] = location;
j["latitude"] = latitude;
j["longitude"] = longitude;
j["description"] = description;
vector<json> jMissions;
for(int i = 0; i<missions.size();i++){
jMissions.push_back(missions[i].get_json());
// Mission mission = fire.get_missions()[j];
}
j["misions"] = jMissions;
return j;
}