libdballe
6.8
|
Storage and index for station information. More...
#include <value.h>
Public Member Functions | |
void | clear () |
size_t | insert (const Station &station, const LevTr &levtr, const Datetime &datetime, std::auto_ptr< wreport::Var > var, bool replace=true) |
Insert a new value, or replace an existing one. | |
size_t | insert (const Station &station, const LevTr &levtr, const Datetime &datetime, const wreport::Var &var, bool replace=true) |
Insert a new value, or replace an existing one. | |
bool | remove (const Station &station, const LevTr &levtr, const Datetime &datetime, wreport::Varcode code) |
Remove a value. More... | |
void | erase (size_t idx) |
Removes a value, by index. | |
void | query (const Record &rec, Results< Station > &stations, Results< LevTr > &levtrs, Results< Value > &res) const |
Query values returning the IDs. | |
void | dump (FILE *out) const |
![]() | |
void | clear () |
size_t | element_count () const |
Number of valid elements. More... | |
Value * | get_checked (size_t idx) |
const Value * | get_checked (size_t idx) const |
std::vector< Value * >::reference | operator[] (size_t idx) |
std::vector< Value * >::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 |
Index< const LevTr * > | by_levtr |
Index< Date > | by_date |
![]() | |
std::vector< Value * > | values |
std::vector< size_t > | empty_slots |
Additional Inherited Members | |
![]() | |
typedef Value | value_type |
![]() | |
size_t | value_add (Value *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::Values::remove | ( | const Station & | station, |
const LevTr & | levtr, | ||
const Datetime & | datetime, | ||
wreport::Varcode | code | ||
) |
Remove a value.
Returns true if found and removed, false if it was not found.