libdballe  7.29
Public Member Functions | Protected Attributes | List of all members
dballe::db::Explorer Class Reference

Public Member Functions

 Explorer (dballe::DB &db)
 
const dballe::Queryget_filter () const
 Get the current filter.
 
void set_filter (const dballe::Query &query)
 Set a new filter, updating all browsing data.
 
void revalidate ()
 Throw away all cached data and reload everything from the database. More...
 
const dballe::db::Summaryglobal_summary () const
 Get a reference to the global summary.
 
const dballe::db::Summaryactive_summary () const
 Get a reference to the summary for the current filter.
 
void update_station (values::Value &val, const wreport::Var &new_val)
 Update val in the database to have the value new_val. More...
 
void update_data (values::Value &val, const wreport::Var &new_val)
 Update val in the database to have the value new_val. More...
 
void update_attr (int var_id, wreport::Varcode var_related, const wreport::Var &new_val)
 Update an attribute.
 
void remove (const values::Value &val)
 Remove the value from the database.
 

Protected Attributes

dballe::DBdb
 DB-All.e database.
 
dballe::core::Query filter
 Currently active filter.
 
dballe::db::Summary_global_summary = nullptr
 Summary of the whole database.
 
dballe::db::Summary_active_summary = nullptr
 Summary of active_filter.
 

Member Function Documentation

void dballe::db::Explorer::revalidate ( )

Throw away all cached data and reload everything from the database.

Use this when you suspect that the database has been externally modified

void dballe::db::Explorer::update_data ( values::Value val,
const wreport::Var new_val 
)

Update val in the database to have the value new_val.

Updates the 'val' member of 'val' if it succeeded, otherwise exceptions are raised

void dballe::db::Explorer::update_station ( values::Value val,
const wreport::Var new_val 
)

Update val in the database to have the value new_val.

Updates the 'val' member of 'val' if it succeeded, otherwise exceptions are raised


The documentation for this class was generated from the following file: