libdballe
7.6
|
Common implementation of the set* and enq* machinery using input and output records. More...
#include <commonapi.h>
Public Types | |
enum | AttrState { ATTR_DAMMELO = 1, ATTR_PRENDILO = 2, ATTR_REFERENCE = 3 } |
Public Member Functions | |
virtual void | test_input_to_output () |
virtual int | enqi (const char *param) |
Read one integer value from the output record. More... | |
virtual signed char | enqb (const char *param) |
Read one byte value from the output record. More... | |
virtual float | enqr (const char *param) |
Read one real value from the output record. More... | |
virtual double | enqd (const char *param) |
Read one real*8 value from the output record. More... | |
virtual const char * | enqc (const char *param) |
Read one character value from the output record. More... | |
virtual void | seti (const char *param, int value) |
Set one integer value into the input record. More... | |
virtual void | setb (const char *param, signed char value) |
Set one byte value into the input record. More... | |
virtual void | setr (const char *param, float value) |
Set one real value into the input record. More... | |
virtual void | setd (const char *param, double value) |
Set one real*8 value into the input record. More... | |
virtual void | setc (const char *param, const char *value) |
Set one character value into the input record. More... | |
virtual void | setcontextana () |
Shortcut function to set query parameters to the anagraphical context. More... | |
virtual void | enqlevel (int <ype1, int &l1, int <ype2, int &l2) |
Shortcut function to read level data. More... | |
virtual void | setlevel (int ltype1, int l1, int ltype2, int l2) |
Shortcut function to set level data. More... | |
virtual void | enqtimerange (int &ptype, int &p1, int &p2) |
Shortcut function to read time range data. More... | |
virtual void | settimerange (int ptype, int p1, int p2) |
Shortcut function to set time range data. More... | |
virtual void | enqdate (int &year, int &month, int &day, int &hour, int &min, int &sec) |
Shortcut function to read date information. More... | |
virtual void | setdate (int year, int month, int day, int hour, int min, int sec) |
Shortcut function to set date information. More... | |
virtual void | setdatemin (int year, int month, int day, int hour, int min, int sec) |
Shortcut function to set minimum date for a query. More... | |
virtual void | setdatemax (int year, int month, int day, int hour, int min, int sec) |
Shortcut function to set maximum date for a query. More... | |
virtual void | unset (const char *param) |
Remove one parameter from the input record. More... | |
virtual void | unsetall () |
Remove all parameters from the input record. More... | |
virtual void | unsetb () |
Remove all B* parameters from the input record. More... | |
virtual const char * | spiegal (int ltype1, int l1, int ltype2, int l2) |
virtual const char * | spiegat (int ptype, int p1, int p2) |
virtual const char * | spiegab (const char *varcode, const char *value) |
virtual const char * | ancora () |
Retrieve QC informations from the last variable returned by dammelo(). More... | |
AttrState | test_get_attr_state () const |
![]() | |
virtual void | scopa (const char *repinfofile=0)=0 |
Reset the database contents, loading default report informations from a file. More... | |
virtual void | remove_all ()=0 |
Remove all data from the database. More... | |
virtual int | quantesono ()=0 |
Count the number of elements in the anagraphical storage, and start a new anagraphical query. More... | |
virtual void | elencamele ()=0 |
Iterate through the anagraphical data. More... | |
virtual int | voglioquesto ()=0 |
Submit a query to the database. More... | |
virtual const char * | dammelo ()=0 |
Iterate through the query results data. More... | |
virtual void | prendilo ()=0 |
Insert a new item in the database. More... | |
virtual void | dimenticami ()=0 |
Remove all selected items from the database. More... | |
virtual void | messages_open_input (const char *filename, const char *mode, File::Encoding format, bool simplified=true)=0 |
Open a BUFR/CREX/AOF file for reading. More... | |
virtual void | messages_open_output (const char *filename, const char *mode, File::Encoding format)=0 |
Open a BUFR/CREX/AOF file for writing. More... | |
virtual bool | messages_read_next ()=0 |
Read the next message and import it in the database. More... | |
virtual void | messages_write_next (const char *template_name=0)=0 |
Export the currently selected data to the output message. | |
virtual int | voglioancora ()=0 |
Retrieve QC informations from the last variable returned by dammelo(). More... | |
virtual void | critica ()=0 |
Insert new QC informations for a variable of the current record. More... | |
virtual void | scusa ()=0 |
Remove QC informations for a variable of the current record. More... | |
Protected Member Functions | |
void | set_permissions (const char *anaflag, const char *dataflag, const char *attrflag) |
Set the permission bits, parsing the flags and doing consistency checks. | |
Record & | choose_input_record (const char *¶m) |
Choose the input record to use for param. More... | |
Record & | choose_output_record (const char *¶m) |
Choose the output record to use for param. More... | |
void | read_qc_list (std::vector< wreport::Varcode > &res_arr) const |
Reads the list of QC values to operate on, for dba_voglioancora and dba_scusa. | |
Protected Attributes | |
int | perms |
core::Record | input |
bool | station_context = false |
core::Record | output |
core::Record | qcinput |
core::Record | qcoutput |
int | qc_iter |
int | qc_count |
AttrState | attr_state |
wreport::Varcode | attr_varid |
int | attr_reference_id |
std::string | cached_spiega |
Additional Inherited Members | |
![]() | |
static const signed char | missing_byte |
static const int | missing_int |
static const float | missing_float |
static const double | missing_double |
Common implementation of the set* and enq* machinery using input and output records.
|
virtual |
Retrieve QC informations from the last variable returned by dammelo().
handle | Handle to a DBALLE session |
parameter | Contains the ID of the parameter retrieved by this fetch |
Implements dballe::fortran::API.
|
protected |
Choose the input record to use for param.
Also, adjust param to remove a leading '*' if present.
|
protected |
Choose the output record to use for param.
Also, adjust param to remove a leading '*' if present.
|
virtual |
Read one byte value from the output record.
handle | Handle to a DBALLE session |
parameter | Parameter to query. It can be the code of a WMO variable prefixed by "B" (such as "B01023" ); the code of a QC value prefixed by "*B" (such as "*B01023" ) or a keyword among the ones defined in Keywords used by dba_record |
value | Where the value will be returned |
Implements dballe::fortran::API.
|
virtual |
Read one character value from the output record.
handle | Handle to a DBALLE session |
parameter | Parameter to query. It can be the code of a WMO variable prefixed by "B" (such as "B01023" ); the code of a QC value prefixed by "*B" (such as "*B01023" ) or a keyword among the ones defined in Keywords used by dba_record |
value | Where the value will be returned |
Implements dballe::fortran::API.
|
virtual |
Read one real*8 value from the output record.
handle | Handle to a DBALLE session |
parameter | Parameter to query. It can be the code of a WMO variable prefixed by "B" (such as "B01023" ); the code of a QC value prefixed by "*B" (such as "*B01023" ) or a keyword among the ones defined in Keywords used by dba_record |
value | Where the value will be returned |
Implements dballe::fortran::API.
|
virtual |
Shortcut function to read date information.
handle | Handle to a DBALLE session |
year | Year from the output record |
month | Month the output record |
day | Day the output record |
hour | Hour the output record |
min | Minute the output record |
sec | Second the output record |
Implements dballe::fortran::API.
|
virtual |
Read one integer value from the output record.
handle | Handle to a DBALLE session |
parameter | Parameter to query. It can be the code of a WMO variable prefixed by "B" (such as "B01023" ); the code of a QC value prefixed by "*B" (such as "*B01023" ) or a keyword among the ones defined in Keywords used by dba_record |
value | Where the value will be returned |
Implements dballe::fortran::API.
Reimplemented in dballe::fortran::DbAPI.
|
virtual |
Shortcut function to read level data.
handle | Handle to a DBALLE session |
ltype | Level type from the output record |
l1 | L1 from the output record |
l2 | L2 from the output record |
Implements dballe::fortran::API.
|
virtual |
Read one real value from the output record.
handle | Handle to a DBALLE session |
parameter | Parameter to query. It can be the code of a WMO variable prefixed by "B" (such as "B01023" ); the code of a QC value prefixed by "*B" (such as "*B01023" ) or a keyword among the ones defined in Keywords used by dba_record |
value | Where the value will be returned |
Implements dballe::fortran::API.
|
virtual |
Shortcut function to read time range data.
handle | Handle to a DBALLE session |
ptype | P indicator from the output record |
p1 | P1 from the output record |
p2 | P2 from the output record |
Implements dballe::fortran::API.
|
virtual |
Set one byte value into the input record.
handle | Handle to a DBALLE session |
parameter | Parameter to set. It can be the code of a WMO variable prefixed by "B" (such as "B01023" ); the code of a QC value prefixed by "*B" (such as "*B01023" ) or a keyword among the ones defined in Keywords used by dba_record |
value | The value to assign to the parameter |
Implements dballe::fortran::API.
|
virtual |
Set one character value into the input record.
handle | Handle to a DBALLE session |
parameter | Parameter to set. It can be the code of a WMO variable prefixed by "B" (such as "B01023" ); the code of a QC value prefixed by "*B" (such as "*B01023" ) or a keyword among the ones defined in Keywords used by dba_record |
value | The value to assign to the parameter |
Implements dballe::fortran::API.
|
virtual |
Shortcut function to set query parameters to the anagraphical context.
handle | Handle to a DBALLE session |
Implements dballe::fortran::API.
|
virtual |
Set one real*8 value into the input record.
handle | Handle to a DBALLE session |
parameter | Parameter to set. It can be the code of a WMO variable prefixed by "B" (such as "B01023" ); the code of a QC value prefixed by "*B" (such as "*B01023" ) or a keyword among the ones defined in Keywords used by dba_record |
value | The value to assign to the parameter |
Implements dballe::fortran::API.
|
virtual |
Shortcut function to set date information.
handle | Handle to a DBALLE session |
year | Year to set in the input record |
month | Month to set in the input |
day | Day to set in the input |
hour | Hour to set in the input |
min | Minute to set in the input |
sec | Second to set in the input |
Implements dballe::fortran::API.
|
virtual |
Shortcut function to set maximum date for a query.
handle | Handle to a DBALLE session |
year | Maximum year to set in the query |
month | Maximum month to set in the query |
day | Maximum day to set in the query |
hour | Maximum hour to set in the query |
min | Maximum minute to set in the query |
sec | Maximum second to set in the query |
Implements dballe::fortran::API.
|
virtual |
Shortcut function to set minimum date for a query.
handle | Handle to a DBALLE session |
year | Minimum year to set in the query |
month | Minimum month to set in the query |
day | Minimum day to set in the query |
hour | Minimum hour to set in the query |
min | Minimum minute to set in the query |
sec | Minimum second to set in the query |
Implements dballe::fortran::API.
|
virtual |
Set one integer value into the input record.
handle | Handle to a DBALLE session |
parameter | Parameter to set. It can be the code of a WMO variable prefixed by "B" (such as "B01023" ); the code of a QC value prefixed by "*B" (such as "*B01023" ) or a keyword among the ones defined in Keywords used by dba_record |
value | The value to assign to the parameter |
Implements dballe::fortran::API.
|
virtual |
Shortcut function to set level data.
handle | Handle to a DBALLE session |
ltype | Level type to set in the input record |
l1 | L1 to set in the input record |
l2 | L2 to set in the input record |
Implements dballe::fortran::API.
|
virtual |
Set one real value into the input record.
handle | Handle to a DBALLE session |
parameter | Parameter to set. It can be the code of a WMO variable prefixed by "B" (such as "B01023" ); the code of a QC value prefixed by "*B" (such as "*B01023" ) or a keyword among the ones defined in Keywords used by dba_record |
value | The value to assign to the parameter |
Implements dballe::fortran::API.
|
virtual |
Shortcut function to set time range data.
handle | Handle to a DBALLE session |
ptype | P indicator to set in the input record |
p1 | P1 to set in the input record |
p2 | P2 to set in the input record |
Implements dballe::fortran::API.
|
virtual |
Remove one parameter from the input record.
handle | Handle to a DBALLE session |
parameter | Parameter to remove. It can be the code of a WMO variable prefixed by "B" (such as "B01023" ); the code of a QC value prefixed by "*B" (such as "*B01023" ) or a keyword among the ones defined in Keywords used by dba_record |
Implements dballe::fortran::API.
|
virtual |
Remove all parameters from the input record.
handle | Handle to a DBALLE session |
Implements dballe::fortran::API.
|
virtual |
Remove all B* parameters from the input record.
handle | Handle to a DBALLE session |
Implements dballe::fortran::API.