1#ifndef DBALLE_CORE_ENQ_H
2#define DBALLE_CORE_ENQ_H
23 Enq(
const char* key,
unsigned len)
29 [[noreturn]]
void throw_notfound()
35 virtual const char* name()
const = 0;
38 virtual void set_bool(
bool val) = 0;
41 virtual void set_int(
int val) = 0;
44 virtual void set_dballe_int(
int val) = 0;
47 virtual void set_string(
const std::string& val)
53 virtual void set_ident(
const Ident& ident)
108 template<
typename Values>
109 bool search_b_values(
const Values& values)
111 if (key[0] !=
'B' || len != 6)
116 if (var && var->
isset())
123 if (key[0] !=
'B' || len != 6)
127 if (code != value.
code())
131 if (var && var->
isset())
136 template<
typename Values>
137 void search_alias_values(
const Values& values)
141 if (var && var->
isset())
148 if (code != value.
code())
151 if (var && var->
isset())
161 const char* name()
const override {
return "enqi"; }
163 void set_bool(
bool val)
override
169 void set_int(
int val)
override
175 void set_dballe_int(
int val)
override
177 if (val == MISSING_INT)
183 void set_lat(
int lat)
override
185 if (lat == MISSING_INT)
191 void set_lon(
int lon)
override
193 if (lon == MISSING_INT)
211 const char* name()
const override {
return "enqd"; }
213 void set_bool(
bool val)
override
219 void set_int(
int val)
override
225 void set_dballe_int(
int val)
override
227 if (val == MISSING_INT)
233 void set_lat(
int lat)
override
235 if (lat == MISSING_INT)
241 void set_lon(
int lon)
override
243 if (lon == MISSING_INT)
A station identifier, that can be any string (including the empty string) or a missing value.
Definition: types.h:748
Container for a wreport::Var pointer.
Definition: value.h:19
wreport::Varcode code() const
Return the varcode of the variable, or 0 if no variable has been set.
static void throwf(const char *fmt,...) WREPORT_THROWF_ATTRS(1
static void throwf(const char *fmt,...) WREPORT_THROWF_ATTRS(1
Shortcut functions to work with wreport::Var in DB-All.e.
static double lon_from_int(int lon)
Convert a longitude from the internal integer representation.
static double lat_from_int(int lat)
Convert a latitude from the internal integer representation.
Class passed to key-value accessors to set values in an invoker-defined way.
Definition: core/enq.h:18
virtual void set_var_value(const wreport::Var &var)=0
Set the value using the value of the given variable.
Definition: core/enq.h:207
void set_var_value(const wreport::Var &var) override
Set the value using the value of the given variable.
Definition: core/enq.h:249
Definition: core/enq.h:157
void set_var_value(const wreport::Var &var) override
Set the value using the value of the given variable.
Definition: core/enq.h:199
Common base types used by most of DB-All.e code.
Structures used as input to database insert functions.
wreport::Varcode resolve_varcode(const char *name)
Resolve a variable name to a varcode proper, dealing with aliases and validation.
#define WR_STRING_TO_VAR(str)