Bridges-C++  3.4.5-dev1-6-g935685a
Bridges(C++ API)
Public Member Functions | List of all members
bridges::dataset::USState Class Reference

#include <USState.h>

Public Member Functions

 USState ()=default
 
 USState (string st)
 
unordered_map< string, USCountygetCounties () const
 obtain a copy of the county data for that state More...
 
unordered_map< string, USCounty > & accessCounties ()
 obtain reference to the county data for that state More...
 
void setCounties (unordered_map< string, USCounty > &c)
 sets the counties for this state More...
 
string getStateName () const
 
void setStateName (string n)
 
datastructure::Color getStrokeColor () const
 
void setStrokeColor (datastructure::Color c)
 
datastructure::Color getFillColor () const
 
void setFillColor (datastructure::Color c)
 
float getStrokeWidth () const
 
void setStrokeWidth (float width)
 
bool getViewCountiesFlag () const
 this flag lets you turn on/off counties as needed More...
 
void setViewCountiesFlag (bool flag)
 

Constructor & Destructor Documentation

◆ USState() [1/2]

bridges::dataset::USState::USState ( )
default

◆ USState() [2/2]

bridges::dataset::USState::USState ( string  st)
inline

Member Function Documentation

◆ accessCounties()

unordered_map<string, USCounty>& bridges::dataset::USState::accessCounties ( )
inline

obtain reference to the county data for that state

This is mostly useful to get direct access to the county data inside of the state for manipulation. For instance

State s;
for (auto& c: s.accessCounties()) {
c.second.setStrokeColor(Color(50,250,50));
c.second.setFillColor(Color(0,0,25));
}

{c}

◆ getCounties()

unordered_map<string, USCounty> bridges::dataset::USState::getCounties ( ) const
inline

obtain a copy of the county data for that state

The Counties are indexed by FIPS code. (FIPS code are defined by the US Federal Government. See list here: https://transition.fcc.gov/oet/info/maps/census/fips/fips.txt )

◆ getFillColor()

datastructure::Color bridges::dataset::USState::getFillColor ( ) const
inline

◆ getStateName()

string bridges::dataset::USState::getStateName ( ) const
inline

◆ getStrokeColor()

datastructure::Color bridges::dataset::USState::getStrokeColor ( ) const
inline

◆ getStrokeWidth()

float bridges::dataset::USState::getStrokeWidth ( ) const
inline

◆ getViewCountiesFlag()

bool bridges::dataset::USState::getViewCountiesFlag ( ) const
inline

this flag lets you turn on/off counties as needed

◆ setCounties()

void bridges::dataset::USState::setCounties ( unordered_map< string, USCounty > &  c)
inline

sets the counties for this state

Parameters
clist o counties of this state

◆ setFillColor()

void bridges::dataset::USState::setFillColor ( datastructure::Color  c)
inline

◆ setStateName()

void bridges::dataset::USState::setStateName ( string  n)
inline

◆ setStrokeColor()

void bridges::dataset::USState::setStrokeColor ( datastructure::Color  c)
inline

◆ setStrokeWidth()

void bridges::dataset::USState::setStrokeWidth ( float  width)
inline

◆ setViewCountiesFlag()

void bridges::dataset::USState::setViewCountiesFlag ( bool  flag)
inline

The documentation for this class was generated from the following file: