#include <StationHandler.h>
Types publics | |
typedef StationVectorType::iterator | iterator |
typedef StationVectorType::const_iterator | const_iterator |
Fonctions membres publiques | |
SharedConstStation | createStation (const std::wstring stationName) |
SharedConstStation | getStation (const std::wstring &name) const |
Trouve une station par son nom, sans tolérer d'erreur. | |
SharedConstStation | getStationAware (const std::wstring &name) const |
Trouve une station par son nom. Tolère des erreurs de cases, et d'accents. | |
SharedConstStation | getStation (const int id) const |
void | clear () |
std::size_t | size () const |
const_iterator | begin () const |
const_iterator | end () const |
Contient toutes les stations, et permet de les retrouver facilement
typedef StationVectorType::const_iterator StationHandler::const_iterator |
typedef StationVectorType::iterator StationHandler::iterator |
StationHandler::const_iterator StationHandler::begin | ( | ) | const [inline] |
void StationHandler::clear | ( | ) |
SharedConstStation StationHandler::createStation | ( | const std::wstring | stationName | ) |
StationHandler::const_iterator StationHandler::end | ( | ) | const [inline] |
SharedConstStation StationHandler::getStation | ( | const int | id | ) | const |
SharedConstStation StationHandler::getStation | ( | const std::wstring & | name | ) | const |
Trouve une station par son nom, sans tolérer d'erreur.
SharedConstStation StationHandler::getStationAware | ( | const std::wstring & | name | ) | const |
Trouve une station par son nom. Tolère des erreurs de cases, et d'accents.
Le problème avec un collate qui supprime les accents et majuscules, c'est que si deux noms de stations ne diffèrent que par un accent, l'une des deux ne sera plus accessible. Donc la recherche est d'abord faite par getStation, et si on ne trouve pas, en dernier recours, on utilise DVPCollate.
Il aurait été possible de faire une autre map spécialement pour getStationAware. Cela aurait évité le foreach, mais pas très utile pour le moment.
std::size_t StationHandler::size | ( | ) | const [inline] |