libdballe 9.6
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
dballe::db::summary::Cursor< Station > Struct Template Reference
Inheritance diagram for dballe::db::summary::Cursor< Station >:
dballe::impl::CursorSummary dballe::CursorSummary dballe::Cursor

Public Member Functions

 Cursor (const BaseSummary< Station > &summary, const Query &query)
 
 Cursor (const summary::StationEntries< Station > &entries, const Query &query)
 
bool has_value () const
 Check if the cursor points to a valid value.
 
int remaining () const override
 Get the number of rows still to be fetched.
 
bool next () override
 Get a new item from the results of a query.
 
void discard () override
 Discard the results that have not been read yet.
 
DBStation get_station () const override
 Get the whole station data in a single call.
 
Level get_level () const override
 Get the level.
 
Trange get_trange () const override
 Get the time range.
 
wreport::Varcode get_varcode () const override
 Get the variable code.
 
DatetimeRange get_datetimerange () const override
 Get the datetime range.
 
size_t get_count () const override
 Get the count of elements.
 
void enq (impl::Enq &enq) const
 
virtual void enq (Enq &enq) const =0
 
virtual Level get_level () const =0
 Get the level.
 
virtual Trange get_trange () const =0
 Get the time range.
 
virtual wreport::Varcode get_varcode () const =0
 Get the variable code.
 
virtual DatetimeRange get_datetimerange () const =0
 Get the datetime range.
 
virtual size_t get_count () const =0
 Get the count of elements.
 
virtual bool has_value () const =0
 Check if the cursor points to a valid value.
 
virtual int remaining () const =0
 Get the number of rows still to be fetched.
 
virtual bool next ()=0
 Get a new item from the results of a query.
 
virtual void discard ()=0
 Discard the results that have not been read yet.
 
virtual DBStation get_station () const =0
 Get the whole station data in a single call.
 

Static Public Member Functions

static DBStation _get_dbstation (const DBStation &s)
 
static DBStation _get_dbstation (const dballe::Station &station)
 
static int _get_station_id (const DBStation &s)
 
static int _get_station_id (const dballe::Station &s)
 
- Static Public Member Functions inherited from dballe::impl::CursorSummary
static std::shared_ptr< CursorSummarydowncast (std::shared_ptr< dballe::CursorSummary > c)
 Downcast a shared_ptr pointer.
 
static std::shared_ptr< CursorSummarymake_empty ()
 Create a CursorSummary iterating on no results.
 

Public Attributes

summary::StationEntries< Stationresults
 
summary::StationEntries< Station >::const_iterator station_entry
 
summary::StationEntry< Station >::const_iterator var_entry
 
bool at_start = true
 
int _remaining = 0
 

Member Function Documentation

◆ discard()

template<typename Station >
void dballe::db::summary::Cursor< Station >::discard ( )
inlineoverridevirtual

Discard the results that have not been read yet.

Implements dballe::Cursor.

◆ enq()

template<typename Station >
void dballe::db::summary::Cursor< Station >::enq ( impl::Enq enq) const
virtual

◆ get_count()

template<typename Station >
size_t dballe::db::summary::Cursor< Station >::get_count ( ) const
inlineoverridevirtual

Get the count of elements.

Implements dballe::CursorSummary.

◆ get_datetimerange()

template<typename Station >
DatetimeRange dballe::db::summary::Cursor< Station >::get_datetimerange ( ) const
inlineoverridevirtual

Get the datetime range.

Implements dballe::CursorSummary.

◆ get_level()

template<typename Station >
Level dballe::db::summary::Cursor< Station >::get_level ( ) const
inlineoverridevirtual

Get the level.

Implements dballe::CursorSummary.

◆ get_station()

template<typename Station >
DBStation dballe::db::summary::Cursor< Station >::get_station ( ) const
inlineoverridevirtual

Get the whole station data in a single call.

Implements dballe::Cursor.

◆ get_trange()

template<typename Station >
Trange dballe::db::summary::Cursor< Station >::get_trange ( ) const
inlineoverridevirtual

Get the time range.

Implements dballe::CursorSummary.

◆ get_varcode()

template<typename Station >
wreport::Varcode dballe::db::summary::Cursor< Station >::get_varcode ( ) const
inlineoverridevirtual

Get the variable code.

Implements dballe::CursorSummary.

◆ has_value()

template<typename Station >
bool dballe::db::summary::Cursor< Station >::has_value ( ) const
inlinevirtual

Check if the cursor points to a valid value.

Returns
true if the cursor points to a valid accessible value, false if next() has not been called yet, or if at the end of iteration (i.e. next() returned false)

Implements dballe::Cursor.

◆ next()

template<typename Station >
bool dballe::db::summary::Cursor< Station >::next ( )
inlineoverridevirtual

Get a new item from the results of a query.

Returns
true if a new record has been read, false if there is no more data to read

Implements dballe::Cursor.

◆ remaining()

template<typename Station >
int dballe::db::summary::Cursor< Station >::remaining ( ) const
inlineoverridevirtual

Get the number of rows still to be fetched.

Returns
The number of rows still to be queried. The value is undefined if no query has been successfully peformed yet using this cursor.

Implements dballe::Cursor.


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