libdballe
6.8
|
Storage and index for station information. More...
#include <stationvalue.h>
Public Member Functions | |
void | clear () |
bool | has_variables_for (const Station &station) const |
const StationValue * | get (const Station &station, wreport::Varcode code) const |
size_t | insert (const Station &station, std::auto_ptr< wreport::Var > var, bool replace=true) |
Insert a new value, or replace an existing one for the same station. | |
size_t | insert (const Station &station, const wreport::Var &var, bool replace=true) |
Insert a new value, or replace an existing one for the same station. | |
bool | remove (const Station &station, wreport::Varcode code) |
Remove a value. More... | |
void | fill_record (const Station &station, Record &rec) const |
Fill a record with all the variables for this station. | |
void | fill_msg (const Station &station, msg::Context &ctx) const |
Fill a message context with all the variables for this station. | |
void | query (const Record &rec, Results< Station > &stations, Results< StationValue > &res) const |
Query values for the given stations. | |
void | dump (FILE *out) const |
![]() | |
void | clear () |
size_t | element_count () const |
Number of valid elements. More... | |
StationValue * | get_checked (size_t idx) |
const StationValue * | get_checked (size_t idx) const |
std::vector< StationValue * > ::reference | operator[] (size_t idx) |
std::vector< StationValue * > ::const_reference | operator[] (size_t idx) const |
index_iterator | index_begin () const |
index_iterator | index_end () const |
void | copy_valptrs_to (OUTITER res) const |
Send all T pointers to the given output iterator. | |
void | copy_indices_to (OUTITER res) const |
Send all T pointers to the given output iterator. | |
Protected Attributes | |
Index< const Station * > | by_station |
![]() | |
std::vector< StationValue * > | values |
std::vector< size_t > | empty_slots |
Additional Inherited Members | |
![]() | |
typedef StationValue | value_type |
![]() | |
size_t | value_add (StationValue *value) |
Add the value to the storage and return its index take ownership of the pointer memory management. | |
void | value_remove (size_t pos) |
Remove a value given its position. | |
Storage and index for station information.
bool dballe::memdb::StationValues::remove | ( | const Station & | station, |
wreport::Varcode | code | ||
) |
Remove a value.
Returns true if found and removed, false if it was not found.