Bridges-C++ 3.5.0-dev1
Bridges(C++ API)
Loading...
Searching...
No Matches
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
 
unordered_map< string, USCounty > & accessCounties ()
 obtain reference to the county data for that state
 
void setCounties (unordered_map< string, USCounty > &c)
 sets the counties for this state
 
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
 
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));
}
unordered_map< string, USCounty > & accessCounties()
obtain reference to the county data for that state
Definition USState.h:67
This class represents Color, and supports rgba, hexadecimal and named color values.
Definition Color.h:50

{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: