1 #ifndef DBALLE_FORTRAN_ENQ_H 2 #define DBALLE_FORTRAN_ENQ_H 4 #include <dballe/core/enq.h> 5 #include <dballe/fortran/api.h> 16 Enqc(
const char* key,
unsigned len,
char* res,
unsigned res_len)
17 : Enq(key, len), res(res), res_len(res_len)
21 const char* name()
const override {
return "enqc"; }
23 void set_bool(
bool val)
override 25 API::to_fortran(val ?
"1" :
"0", res, res_len);
29 void set_int(
int val)
override 31 API::to_fortran(val, res, res_len);
35 void set_dballe_int(
int val)
override 37 if (val == MISSING_INT)
39 API::to_fortran(val, res, res_len);
43 void set_string(
const std::string& val)
override 45 API::to_fortran(val, res, res_len);
49 void set_ident(
const Ident& ident)
override 51 if (ident.is_missing())
53 API::to_fortran(ident.get(), res, res_len);
61 API::to_fortran(buf, res, res_len);
65 void set_lat(
int lat)
override 67 if (lat == MISSING_INT)
69 API::to_fortran(lat, res, res_len);
73 void set_lon(
int lon)
override 75 if (lon == MISSING_INT)
77 API::to_fortran(lon, res, res_len);
84 API::to_fortran(var.
enqc(), res, res_len);
void set_var_value(const wreport::Var &var) override
Set the value using the value of the given variable.
Definition: fortran/enq.h:81
Class passed to key-value accessors to set values in an invoker-defined way.
Definition: core/enq.h:17
A station identifier, that can be any string (including the empty string) or a missing value...
Definition: types.h:747
Definition: fortran/enq.h:10
const char * enqc() const
void format_bcode(wreport::Varcode code, char *buf)
Format the B code to its string representation.