libdballe 9.6
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
dballe::impl::msg::CursorStationData Struct Reference
Inheritance diagram for dballe::impl::msg::CursorStationData:
dballe::impl::CursorStationData dballe::CursorStationData dballe::Cursor

Public Member Functions

 CursorStationData (std::shared_ptr< const impl::Message > msg)
 
bool has_value () const override
 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.
 
void enq (Enq &enq) const override
 
DBStation get_station () const override
 Get the whole station data in a single call.
 
wreport::Varcode get_varcode () const override
 Get the variable code.
 
wreport::Var get_var () const override
 Get the variable.
 
virtual void enq (Enq &enq) const =0
 
virtual wreport::Varcode get_varcode () const =0
 Get the variable code.
 
virtual wreport::Var get_var () const =0
 Get the variable.
 
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 std::shared_ptr< CursorStationDatadowncast (std::shared_ptr< dballe::CursorStationData > c)
 Downcast a unique_ptr pointer.
 
- Static Public Member Functions inherited from dballe::impl::CursorStationData
static std::shared_ptr< CursorStationDatadowncast (std::shared_ptr< dballe::CursorStationData > c)
 Downcast a shared_ptr pointer.
 
static std::shared_ptr< CursorStationDatamake_empty ()
 Create a CursorStationData iterating on no results.
 

Public Attributes

std::shared_ptr< const impl::Messagemsg
 
dballe::DBStation station
 
const Valuesstation_values
 
bool at_start = true
 
Values::const_iterator cur
 

Member Function Documentation

◆ discard()

void dballe::impl::msg::CursorStationData::discard ( )
inlineoverridevirtual

Discard the results that have not been read yet.

Implements dballe::Cursor.

◆ enq()

void dballe::impl::msg::CursorStationData::enq ( Enq enq) const
overridevirtual

◆ get_station()

DBStation dballe::impl::msg::CursorStationData::get_station ( ) const
inlineoverridevirtual

Get the whole station data in a single call.

Implements dballe::Cursor.

◆ get_var()

wreport::Var dballe::impl::msg::CursorStationData::get_var ( ) const
inlineoverridevirtual

Get the variable.

Implements dballe::CursorStationData.

◆ get_varcode()

wreport::Varcode dballe::impl::msg::CursorStationData::get_varcode ( ) const
inlineoverridevirtual

Get the variable code.

Implements dballe::CursorStationData.

◆ has_value()

bool dballe::impl::msg::CursorStationData::has_value ( ) const
inlineoverridevirtual

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()

bool dballe::impl::msg::CursorStationData::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()

int dballe::impl::msg::CursorStationData::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: