Bridges-C++  3.4.1
Bridges(C++API)
City.h
Go to the documentation of this file.
1 #ifndef CITY_H
2 
3 #define CITY_H
4 
5 #include <string>
6 
7 using std::string;
8 
9 
10 namespace bridges {
11  namespace dataset {
12 
30  class City {
31 
32  private:
33  string city, state, country, time_zone;
34  int elevation, population;
35  float latit, longit; // city location
36 
37  public:
41  City() = default;
42 
43  City (string cty, string st, string cntry, string tm_zone,
44  int elev, int pop, float lat, float lon) {
45  city = cty;
46  state = st;
47  country = cntry;
48  time_zone = tm_zone;
49  elevation = elev;
50  population = pop;
51  latit = lat;
52  longit = lon;
53  }
54 
55  string getCity() const{
56  return city;
57  }
58 
59  void setCity(string c) {
60  city = c;
61  }
62 
63  string getState() const{
64  return state;
65  }
66 
67  void setState(string st) {
68  state = st;
69  }
70 
71  string getCountry() const{
72  return country;
73  }
74 
75  void setCountry(string cntry) {
76  country = cntry;
77  }
78 
79  string getTimeZone() const{
80  return time_zone;
81  }
82 
83  void setTimeZone(string tz){
84  time_zone = tz;
85  }
86 
87  float getLatitude() const{
88  return latit;
89  }
90 
91  void setLatitude(float lat) {
92  latit = lat;
93  }
94 
95  float getLongitude() const{
96  return longit;
97  }
98 
99  void setLongitude(float lon) {
100  longit = lon;
101  }
102  float getPopulation()const {
103  return population;
104  }
105 
106  void setPopulation(int pop) {
107  population = pop;
108  }
109 
110  int getElevation() const {
111  return elevation;
112  }
113 
114  void setElevation(int elev) {
115  elevation = elev;
116  }
117  };
118  };
119 };
120 #endif
string getCountry() const
Definition: City.h:71
void setState(string st)
Definition: City.h:67
string getCity() const
Definition: City.h:55
void setElevation(int elev)
Definition: City.h:114
City(string cty, string st, string cntry, string tm_zone, int elev, int pop, float lat, float lon)
Definition: City.h:43
float getPopulation() const
Definition: City.h:102
void setLongitude(float lon)
Definition: City.h:99
string getState() const
Definition: City.h:63
float getLongitude() const
Definition: City.h:95
Class that holds data of a city.
Definition: City.h:30
these methods convert byte arrays in to base64 codes and are used in BRIDGES to represent the color a...
Definition: alltypes.h:4
void setLatitude(float lat)
Definition: City.h:91
int getElevation() const
Definition: City.h:110
string getTimeZone() const
Definition: City.h:79
void setPopulation(int pop)
Definition: City.h:106
void setCountry(string cntry)
Definition: City.h:75
void setTimeZone(string tz)
Definition: City.h:83
void setCity(string c)
Definition: City.h:59
float getLatitude() const
Definition: City.h:87