libdballe  7.21
Public Member Functions | Static Public Member Functions | List of all members
dballe::db::v6::LevTrCache Struct Referenceabstract

Public Member Functions

virtual bool to_rec (int id, Record &rec)=0
 Fill a record with level/timerange info with this id. More...
 
virtual Level to_level (int id) const =0
 Return a Level for this ID.
 
virtual Trange to_trange (int id) const =0
 Return a Trange for this ID.
 
virtual msg::Contextto_msg (int id, Msg &msg)=0
 Get/create a Context in the Msg for this level/timerange. More...
 
virtual void invalidate ()=0
 Invalidate the cache.
 
virtual void dump (FILE *out) const =0
 Dump cache contents to an output stream.
 

Static Public Member Functions

static std::unique_ptr< LevTrCachecreate (LevTr &levtr)
 Create a new LevTrCache for this LevTr.
 

Member Function Documentation

◆ to_msg()

virtual msg::Context* dballe::db::v6::LevTrCache::to_msg ( int  id,
Msg msg 
)
pure virtual

Get/create a Context in the Msg for this level/timerange.

Returns
the context, or 0 if the id is not valid.

◆ to_rec()

virtual bool dballe::db::v6::LevTrCache::to_rec ( int  id,
Record rec 
)
pure virtual

Fill a record with level/timerange info with this id.

Returns
true if found, else false

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