libdballe
7.19
|
Public Member Functions | |
virtual | ~Station () |
Instantiate a Station object for this connection. | |
virtual stations_t::iterator | lookup_id (State &st, int id)=0 |
Look up a station give its ID. More... | |
virtual stations_t::iterator | get_id (State &st, const StationDesc &desc) |
Get the station ID given latitude, longitude and mobile identifier. More... | |
virtual stations_t::iterator | obtain_id (State &st, const StationDesc &desc)=0 |
Get the station ID given latitude, longitude and mobile identifier. More... | |
void | dump (FILE *out) |
Dump the entire contents of the table to an output stream. | |
virtual void | get_station_vars (int id_station, std::function< void(std::unique_ptr< wreport::Var >)> dest)=0 |
Export station variables. | |
virtual void | add_station_vars (int id_station, Record &rec)=0 |
Add all station variables (without attributes) to rec. More... | |
Protected Member Functions | |
virtual bool | maybe_get_id (const StationDesc &st, int *id)=0 |
virtual void | _dump (std::function< void(int, int, const Coords &coords, const char *ident)> out)=0 |
|
pure virtual |
Add all station variables (without attributes) to rec.
If the same variable exists in many different networks, the one with the highest priority will be used.
Implemented in dballe::db::v7::sqlite::SQLiteStation, dballe::db::v7::mysql::MySQLStation, and dballe::db::v7::postgresql::PostgreSQLStation.
|
virtual |
Get the station ID given latitude, longitude and mobile identifier.
It throws an exception if it does not exist.
|
pure virtual |
Look up a station give its ID.
It throws an exception if it does not exist.
Implemented in dballe::db::v7::sqlite::SQLiteStation, dballe::db::v7::mysql::MySQLStation, and dballe::db::v7::postgresql::PostgreSQLStation.
|
pure virtual |
Get the station ID given latitude, longitude and mobile identifier.
It creates the station record if it does not exist.
Implemented in dballe::db::v7::sqlite::SQLiteStation, dballe::db::v7::mysql::MySQLStation, and dballe::db::v7::postgresql::PostgreSQLStation.