libdballe  7.21
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
dballe::fortran::MsgAPI Class Reference
Inheritance diagram for dballe::fortran::MsgAPI:
dballe::fortran::CommonAPIImplementation dballe::fortran::API

Public Member Functions

 MsgAPI (const char *fname, const char *mode, const char *type)
 
virtual void scopa (const char *repinfofile=0)
 
virtual int quantesono ()
 
virtual void elencamele ()
 
virtual int voglioquesto ()
 
virtual const char * dammelo ()
 
virtual void prendilo ()
 
virtual void dimenticami ()
 
virtual int voglioancora ()
 
virtual void critica ()
 
virtual void scusa ()
 
virtual void remove_all ()
 
virtual void messages_open_input (const char *filename, const char *mode, File::Encoding format, bool)
 
virtual void messages_open_output (const char *filename, const char *mode, File::Encoding format)
 
virtual bool messages_read_next ()
 
virtual void messages_write_next (const char *)
 
- Public Member Functions inherited from dballe::fortran::CommonAPIImplementation
void test_input_to_output () override
 
int enqi (const char *param) override
 
signed char enqb (const char *param) override
 
float enqr (const char *param) override
 
double enqd (const char *param) override
 
const char * enqc (const char *param) override
 
void seti (const char *param, int value) override
 
void setb (const char *param, signed char value) override
 
void setr (const char *param, float value) override
 
void setd (const char *param, double value) override
 
void setc (const char *param, const char *value) override
 
void setcontextana () override
 
void enqlevel (int &ltype1, int &l1, int &ltype2, int &l2) override
 
void setlevel (int ltype1, int l1, int ltype2, int l2) override
 
void enqtimerange (int &ptype, int &p1, int &p2) override
 
void settimerange (int ptype, int p1, int p2) override
 
void enqdate (int &year, int &month, int &day, int &hour, int &min, int &sec) override
 
void setdate (int year, int month, int day, int hour, int min, int sec) override
 
void setdatemin (int year, int month, int day, int hour, int min, int sec) override
 
void setdatemax (int year, int month, int day, int hour, int min, int sec) override
 
void unset (const char *param) override
 
void unsetall () override
 
void unsetb () override
 
const char * spiegal (int ltype1, int l1, int ltype2, int l2) override
 
const char * spiegat (int ptype, int p1, int p2) override
 
const char * spiegab (const char *varcode, const char *value) override
 
const char * ancora () override
 
void fatto () override
 
AttrState test_get_attr_state () const
 
const core::Recordtest_get_input () const
 
const core::Recordtest_get_output () const
 
const core::Recordtest_get_qcinput () const
 
const core::Recordtest_get_qcoutput () const
 

Protected Types

enum  { STATE_BLANK = 1, STATE_QUANTESONO = 2, STATE_VOGLIOQUESTO = 4, STATE_EOF = 8 }
 
- Protected Types inherited from dballe::fortran::CommonAPIImplementation
enum  {
  PERM_ANA_RO = (1 << 0), PERM_ANA_WRITE = (1 << 1), PERM_DATA_RO = (1 << 2), PERM_DATA_ADD = (1 << 3),
  PERM_DATA_WRITE = (1 << 4), PERM_ATTR_RO = (1 << 5), PERM_ATTR_WRITE = (1 << 6)
}
 

Protected Member Functions

bool readNextMessage ()
 Read the next message. More...
 
bool incrementMsgIters ()
 Increment message iterators. More...
 
Msgcurmsg ()
 Get a pointer to the current message being read or written.
 
void flushVars ()
 
void flushSubset ()
 
void flushMessage ()
 
- Protected Member Functions inherited from dballe::fortran::CommonAPIImplementation
void set_permissions (const char *anaflag, const char *dataflag, const char *attrflag)
 Set the permission bits, parsing the flags and doing consistency checks.
 
Recordchoose_input_record (const char *&param)
 Choose the input record to use for param. More...
 
Recordchoose_output_record (const char *&param)
 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

Filefile
 
unsigned int state
 State flag to track what actions have been performed in order to decide what to do next.
 
msg::Importerimporter
 Importer (NULL if we export)
 
msg::Exporterexporter
 Exporter (NULL if we import)
 
std::string exporter_template
 Template selected for exporter (empty if auto detect)
 
Messagesmsgs
 Message being written.
 
Msgwmsg
 Message subset being written.
 
std::vector< wreport::Var * > vars
 Last variables written with prendilo.
 
Level vars_level
 Level for vars.
 
Trange vars_trange
 Time range for vars.
 
size_t curmsgidx
 
int iter_ctx
 
int iter_var
 
int cached_cat
 Category set for the message that we are writing.
 
int cached_subcat
 Subcategory set for the message that we are writing.
 
int cached_lcat
 Local category set for the message that we are writing.
 
- Protected Attributes inherited from dballe::fortran::CommonAPIImplementation
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

- Public Types inherited from dballe::fortran::CommonAPIImplementation
enum  AttrState { ATTR_DAMMELO = 1, ATTR_PRENDILO = 2, ATTR_REFERENCE = 3 }
 
- Static Public Attributes inherited from dballe::fortran::API
static const signed char missing_byte
 
static const int missing_int
 
static const float missing_float
 
static const double missing_double
 

Constructor & Destructor Documentation

§ MsgAPI()

dballe::fortran::MsgAPI::MsgAPI ( const char *  fname,
const char *  mode,
const char *  type 
)
Parameters
fnamethe name of the file to open
modethe fopen-style mode to use when opening the file
typethe encoding to use for the file. It can be "BUFR", "CREX", "AOF" (read only) or "AUTO" (read only).

Member Function Documentation

§ incrementMsgIters()

bool dballe::fortran::MsgAPI::incrementMsgIters ( )
protected

Increment message iterators.

Returns
true if it could move on, false if we are at the end

§ readNextMessage()

bool dballe::fortran::MsgAPI::readNextMessage ( )
protected

Read the next message.

Returns
true if there was a next message, false if we reached end of file

The documentation for this class was generated from the following file: