1#ifndef DBALLE_FORTRAN_MSGAPI_H
2#define DBALLE_FORTRAN_MSGAPI_H
7#include <dballe/msg/fwd.h>
16class MsgAPI :
public CommonAPIImplementation
22 STATE_VOGLIOQUESTO = 4,
54 std::shared_ptr<impl::Message>
wmsg =
nullptr;
56 std::vector<std::shared_ptr<dballe::Message>>*
msgs =
nullptr;
67 MsgAPI(
const char* fname,
const char* mode,
const char* type);
77 void set_exporter(
const char* template_name);
79 void reinit_db(
const char* repinfofile = 0)
override;
80 int query_stations()
override;
81 int query_data()
override;
82 void insert_data()
override;
83 void remove_data()
override;
84 void remove_all()
override;
85 void messages_open_input(
const char* filename,
const char* mode,
86 Encoding format,
bool)
override;
87 void messages_open_output(
const char* filename,
const char* mode,
88 Encoding format)
override;
89 bool messages_read_next()
override;
90 void messages_write_next(
const char*)
override;
Message exporter interface.
Definition exporter.h:65
File object for doing I/O on binary message streams.
Definition file.h:18
Message importer interface.
Definition importer.h:69
const impl::Message * curmsg() const
Get a pointer to the current message being read or written.
int cached_cat
Category set for the message that we are writing.
Definition msgapi.h:39
std::string exporter_template
Name of the last exporter template set.
Definition msgapi.h:34
Exporter * exporter
Exporter (NULL if we import)
Definition msgapi.h:36
int cached_lcat
Local category set for the message that we are writing.
Definition msgapi.h:43
bool readNextMessage()
Read the next message.
Importer * importer
Importer (NULL if we export)
Definition msgapi.h:32
std::vector< std::shared_ptr< dballe::Message > > * msgs
Message being written.
Definition msgapi.h:56
std::shared_ptr< impl::Message > wmsg
Message subset being written.
Definition msgapi.h:54
int cached_subcat
Subcategory set for the message that we are writing.
Definition msgapi.h:41
unsigned int state
State flag to track what actions have been performed in order to decide what to do next.
Definition msgapi.h:30
MsgAPI(const char *fname, const char *mode, const char *type)
Storage for related physical data.
Definition msg.h:134