| WXP C++ Library Version 6.74.9
    | 
This class reads in data from city database files. More...
#include "../include/CityFile.h"
| Public Member Functions | |
| CityFile () | |
| CityFile (const char *filename, int access) | |
| CityFile (const char *filename) | |
| ~CityFile () | |
| int | open (const char *filename, int access) | 
| int | open (const char *filename) | 
| bool | isOpen () | 
| int | rewind () | 
| int | close () | 
| int | read (CityData &city) | 
| int | getNum () | 
This class reads in data from city database files.
| CityFile::CityFile | ( | ) | 
Constructor. Initializes values
| CityFile::CityFile | ( | const char * | filename, | 
| int | access | ||
| ) | 
Constructor. Opens file
| filename | File to open | 
| access | File access (FileAttr::READ, FileAttr::WRITE) | 
References open().
| CityFile::CityFile | ( | const char * | filename | ) | 
Constructor. Opens file for read
| filename | File to open | 
References open(), and WXP::FileAttr::READ.
| CityFile::~CityFile | ( | ) | 
Destructor. Closes file
References close().
| int CityFile::close | ( | ) | 
Closes the file and marks the class as closed
References WXP::File::close().
Referenced by WXP::CityPlot::draw(), and ~CityFile().
| int CityFile::getNum | ( | ) | 
Returns an estimate for the number of cities in the file
Referenced by WXP::CityHash::setup(), WXP::UpaRawinHash::setup(), and WXP::CityHash::setup().
| bool CityFile::isOpen | ( | ) | 
Returns true if file opened
Referenced by WXP::CityPlot::draw(), WXP::CityTool::search(), WXP::RcmDecode::setup(), WXP::CityHash::setup(), WXP::UpaRawinHash::setup(), and WXP::CityHash::setup().
| int CityFile::open | ( | const char * | filename | ) | 
Opens the city database file for read
| filename | File to open | 
References open(), and WXP::FileAttr::READ.
| int CityFile::open | ( | const char * | filename, | 
| int | access | ||
| ) | 
Opens the city database file
| filename | File to open | 
| access | File access (FileAttr::READ, FileAttr::WRITE) | 
References WXP::FileTool::getSize(), WXP::File::isOpen(), WXP::File::open(), WXP::FileAttr::READ, and WXP::FileAttr::WRITE.
Referenced by CityFile(), CityFile(), and open().
| int CityFile::read | ( | CityData & | city | ) | 
Reads a single city from the database file
| city | Data object to hold city data | 
References WXP::StrLib::equal(), WXP::File::getLine(), and WXP::Const::MISS.
Referenced by WXP::CityPlot::draw(), WXP::ProfPlot::draw(), WXP::UpaXSectCont::draw(), WXP::UpaXSectPlot::draw(), WXP::CityTool::search(), WXP::RcmDecode::setup(), WXP::CityHash::setup(), WXP::UpaRawinHash::setup(), and WXP::CityHash::setup().
| int CityFile::rewind | ( | ) |