Bridges-C++ 3.5.0-dev1
Bridges(C++ API)
Loading...
Searching...
No Matches
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
7using std::string;
8
9namespace bridges {
10 namespace dataset {
11
26 class USCounty {
27 private:
28 string geoid;
29 string fips_code;
30 string county_name;
31 string state_name;
32 datastructure::Color stroke_color;
33 float stroke_width;
34 datastructure::Color fill_color;
35 bool hide; // county visibility
36
37 public:
42 USCounty() = default;
43
54 USCounty (string id, string code, string county, string state) {
55 geoid = id;
56 fips_code = code;
57 county_name = county;
58 state_name = state;
59 stroke_width = 0.5;
60 fill_color = datastructure::Color("lightblue");
61 stroke_color = datastructure::Color("green");
62 hide = false;
63 }
64 // getters, setters
65 string getGeoId() const {
66 return geoid;
67 }
68
69 string getFipsCode() const {
70 return fips_code;
71 }
72
73 void setFipsCode(string code) {
74 fips_code = code;
75 }
76
77 string getStateName() const {
78 return state_name;
79 }
80 void setStateName(string n) {
81 state_name = n;
82 }
83 string getCountyName() const {
84 return county_name;
85 }
86 void setCountyName(string n) {
87 county_name = n;
88 }
89
91 return stroke_color;
92 }
94 stroke_color = c;
95 }
96
98 return fill_color;
99 }
101 fill_color = c;
102 }
103
104 float getStrokeWidth() const {
105 return stroke_width;
106 }
107 void setStrokeWidth(float width) {
108 stroke_width = width;
109 }
110
111 bool getHideFlag() const {
112 return hide;
113 }
114 void setHideFlag(bool flag) {
115 hide = flag;
116 }
117
118 };
119 };
120};
121#endif
This object contains US county related information.
Definition USCounty.h:26
void setCountyName(string n)
Definition USCounty.h:86
string getGeoId() const
Definition USCounty.h:65
bool getHideFlag() const
Definition USCounty.h:111
string getStateName() const
Definition USCounty.h:77
USCounty(string id, string code, string county, string state)
Constructor.
Definition USCounty.h:54
datastructure::Color getStrokeColor() const
Definition USCounty.h:90
void setStrokeColor(datastructure::Color c)
Definition USCounty.h:93
void setFipsCode(string code)
Definition USCounty.h:73
void setFillColor(datastructure::Color c)
Definition USCounty.h:100
string getFipsCode() const
Definition USCounty.h:69
void setStateName(string n)
Definition USCounty.h:80
void setStrokeWidth(float width)
Definition USCounty.h:107
float getStrokeWidth() const
Definition USCounty.h:104
string getCountyName() const
Definition USCounty.h:83
void setHideFlag(bool flag)
Definition USCounty.h:114
USCounty()=default
Constructor.
datastructure::Color getFillColor() const
Definition USCounty.h:97
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