This class sets up a hash table for city database information. More...
#include "../include/CityHash.h"
Public Member Functions | |
| CityHash (const char *file, Domain &domain, int prior) | |
| CityHash (const char *file) | |
| CityHash () | |
| int | init () |
| int | set (const char *file, Domain &domain, int prior) |
| int | set (const char *file) |
| int | get (const char *id, CityHashData &data) |
| int | get (int ind, const char *id, CityHashData &data) |
| int | first () |
| const char * | nextKey () |
| int | getNum () |
| int | print () |
| int | printData () |
This class sets up a hash table for city database information.
| CityHash::CityHash | ( | const char * | file, | |
| Domain & | domain, | |||
| int | prior | |||
| ) |
Constructor. Sets up hash table.
| file | City database file to use | |
| domain | Domain to save cities from | |
| prior | Maximum priority to save |
| CityHash::CityHash | ( | const char * | file | ) |
Constructor. Sets up hash table.
| file | City database file to use |
| CityHash::CityHash | ( | ) |
Constructor. Sets up hash table.
| int CityHash::first | ( | ) |
Goes to first city in hash table
References WXP::Hash::first().
| int CityHash::get | ( | int | ind, | |
| const char * | id, | |||
| CityHashData & | data | |||
| ) |
Gets the city data from hash
| ind | Type of ID | |
| id | City ID to search hash |
| data | CityHashData class containing output data |
References WXP::Hash::search().
| int CityHash::get | ( | const char * | id, | |
| CityHashData & | data | |||
| ) |
Gets the city data from hash checking id for type of key
| id | City ID to search hash |
| data | CityHashData class containing output data |
References WXP::StrLib::check(), WXP::StrLib::length(), and WXP::Hash::search().
Referenced by WXP::RcmPlot::draw(), and WXP::MdrPlot::draw().
| const char * CityHash::nextKey | ( | ) |
| int CityHash::print | ( | ) |
Prints hash table information
References WXP::Hash::print().
| int CityHash::printData | ( | ) |
Prints the hash table data
References WXP::Hash::print().
| int CityHash::set | ( | const char * | file | ) |
Sets up hash table with all stations from file
| file | City database file to use |
References WXP::FileTool::addPath(), WXP::CityHashData::city, WXP::Hash::enter(), WXP::StrLib::equal(), WXP::String::get(), WXP::Wxp::getDatabasePath(), WXP::CityData::getId(), WXP::CityData::getLat(), WXP::CityData::getLon(), WXP::CityData::getRegion(), WXP::CityData::getWmo(), WXP::Wxp::outMessage(), WXP::FileAttr::READ, and WXP::Hash::set().
| int CityHash::set | ( | const char * | file, | |
| Domain & | domain, | |||
| int | prior | |||
| ) |
Sets up hash table. Filter based on domain and priority
| file | City database file to use | |
| domain | Domain to save cities from | |
| prior | Maximum priority to save |
References WXP::FileTool::addPath(), WXP::CityHashData::city, WXP::Hash::enter(), WXP::StrLib::equal(), WXP::String::get(), WXP::Wxp::getDatabasePath(), WXP::CityData::getId(), WXP::CityData::getLat(), WXP::CityData::getLon(), WXP::CityData::getPrior(), WXP::CityData::getRegion(), WXP::CityData::getWmo(), WXP::Wxp::outMessage(), WXP::FileAttr::READ, WXP::EarthPoint::set(), WXP::Hash::set(), WXP::Domain::tran(), and WXP::Domain::withinExt().
Referenced by WXP::MdrPlot::draw().
1.6.1