Bridges-C++  3.4.5-dev1-6-g935685a
Bridges(C++ API)
USCounty.h
Go to the documentation of this file.
1 #ifndef COUNTY_H
2 #define COUNTY_H
3 
4 #include <string>
5 #include "Color.h"
6 
7 using std::string;
8 
9 
10 
11 namespace bridges {
12  namespace dataset {
13 
28  class USCounty {
29  private:
30  string geoid;
31  string fips_code;
32  string county_name;
33  string state_name;
34  datastructure::Color stroke_color;
35  float stroke_width;
36  datastructure::Color fill_color;
37  bool hide; // county visibility
38 
39  public:
44  USCounty() = default;
45 
56  USCounty (string id, string code, string county, string state) {
57  geoid = id;
58  fips_code = code;
59  county_name = county;
60  state_name = state;
61  stroke_width = 0.5;
62  fill_color = datastructure::Color("red");
63  stroke_color = datastructure::Color("blue");
64  hide = false;
65  }
66  // getters, setters
67  string getGeoId() const {
68  return geoid;
69  }
70 
71  string getFipsCode() const {
72  return fips_code;
73  }
74 
75  void setFipsCode(string code) {
76  fips_code = code;
77  }
78 
79  string getStateName() const {
80  return state_name;
81  }
82  void setStateName(string n) {
83  state_name = n;
84  }
85  string getCountyName() const {
86  return county_name;
87  }
88  void setCountyName(string n) {
89  county_name = n;
90  }
91 
93  return stroke_color;
94  }
96  stroke_color = c;
97  }
98 
100  return fill_color;
101  }
103  fill_color = c;
104  }
105 
106  float getStrokeWidth() const {
107  return stroke_width;
108  }
109  void setStrokeWidth(float width) {
110  stroke_width = width;
111  }
112 
113  bool getHideFlag() const {
114  return hide;
115  }
116  void setHideFlag(bool flag) {
117  hide = flag;
118  }
119 
120  };
121  };
122 };
123 #endif
This object contains US county related information.
Definition: USCounty.h:28
void setCountyName(string n)
Definition: USCounty.h:88
string getGeoId() const
Definition: USCounty.h:67
bool getHideFlag() const
Definition: USCounty.h:113
string getStateName() const
Definition: USCounty.h:79
USCounty(string id, string code, string county, string state)
Constructor.
Definition: USCounty.h:56
datastructure::Color getStrokeColor() const
Definition: USCounty.h:92
void setStrokeColor(datastructure::Color c)
Definition: USCounty.h:95
void setFipsCode(string code)
Definition: USCounty.h:75
void setFillColor(datastructure::Color c)
Definition: USCounty.h:102
string getFipsCode() const
Definition: USCounty.h:71
void setStateName(string n)
Definition: USCounty.h:82
void setStrokeWidth(float width)
Definition: USCounty.h:109
float getStrokeWidth() const
Definition: USCounty.h:106
string getCountyName() const
Definition: USCounty.h:85
void setHideFlag(bool flag)
Definition: USCounty.h:116
USCounty()=default
Constructor.
datastructure::Color getFillColor() const
Definition: USCounty.h:99
This class represents Color, and supports rgba, hexadecimal and named color values.
Definition: Color.h:50
Support for drawing Bar charts.
Definition: alltypes.h:4