1 #ifndef DBALLE_CORE_CURSOR_H
2 #define DBALLE_CORE_CURSOR_H
4 #include <dballe/cursor.h>
5 #include <dballe/core/enq.h>
14 virtual void enq(
Enq& enq)
const = 0;
17 inline static std::unique_ptr<CursorStation>
downcast(std::unique_ptr<dballe::CursorStation> c)
19 return std::unique_ptr<CursorStation>(dynamic_cast<CursorStation*>(c.release()));
23 static std::unique_ptr<CursorStation>
make_empty();
29 virtual void enq(
Enq& enq)
const = 0;
32 inline static std::unique_ptr<CursorStationData>
downcast(std::unique_ptr<dballe::CursorStationData> c)
34 return std::unique_ptr<CursorStationData>(dynamic_cast<CursorStationData*>(c.release()));
38 static std::unique_ptr<CursorStationData>
make_empty();
44 virtual void enq(
Enq& enq)
const = 0;
47 inline static std::unique_ptr<CursorData>
downcast(std::unique_ptr<dballe::CursorData> c)
49 return std::unique_ptr<CursorData>(dynamic_cast<CursorData*>(c.release()));
53 static std::unique_ptr<CursorData>
make_empty();
59 virtual void enq(
Enq& enq)
const = 0;
62 inline static std::unique_ptr<CursorSummary>
downcast(std::unique_ptr<dballe::CursorSummary> c)
64 return std::unique_ptr<CursorSummary>(dynamic_cast<CursorSummary*>(c.release()));
68 static std::unique_ptr<CursorSummary>
make_empty();
74 virtual void enq(
Enq& enq)
const {}
77 inline static std::unique_ptr<CursorMessage>
downcast(std::unique_ptr<dballe::CursorMessage> c)
79 return std::unique_ptr<CursorMessage>(dynamic_cast<CursorMessage*>(c.release()));
83 static std::unique_ptr<CursorMessage>
make_empty();
Cursor iterating over stations.
Definition: cursor.h:56
static std::unique_ptr< CursorStation > downcast(std::unique_ptr< dballe::CursorStation > c)
Downcast a unique_ptr pointer.
Definition: core/cursor.h:17
Cursor iterating over messages.
Definition: core/cursor.h:72
Class passed to key-value accessors to set values in an invoker-defined way.
Definition: core/enq.h:17
Cursor iterating over summary entries.
Definition: cursor.h:97
Cursor iterating over stations.
Definition: core/cursor.h:12
static std::unique_ptr< CursorMessage > make_empty()
Create a CursorStation iterating on no results.
Cursor iterating over summary entries.
Definition: core/cursor.h:57
static std::unique_ptr< CursorMessage > downcast(std::unique_ptr< dballe::CursorMessage > c)
Downcast a unique_ptr pointer.
Definition: core/cursor.h:77
static std::unique_ptr< CursorData > make_empty()
Create a CursorData iterating on no results.
static std::unique_ptr< CursorSummary > downcast(std::unique_ptr< dballe::CursorSummary > c)
Downcast a unique_ptr pointer.
Definition: core/cursor.h:62
static std::unique_ptr< CursorData > downcast(std::unique_ptr< dballe::CursorData > c)
Downcast a unique_ptr pointer.
Definition: core/cursor.h:47
static std::unique_ptr< CursorSummary > make_empty()
Create a CursorSummary iterating on no results.
static std::unique_ptr< CursorStationData > downcast(std::unique_ptr< dballe::CursorStationData > c)
Downcast a unique_ptr pointer.
Definition: core/cursor.h:32
Cursor iterating over station data values.
Definition: cursor.h:66
static std::unique_ptr< CursorStation > make_empty()
Create a CursorStation iterating on no results.
Cursor iterating over data values.
Definition: cursor.h:77
Cursor iterating over station data values.
Definition: core/cursor.h:27
Cursor iterating over data values.
Definition: core/cursor.h:42
Cursor iterating over messages.
Definition: cursor.h:117
static std::unique_ptr< CursorStationData > make_empty()
Create a CursorStationData iterating on no results.