libdballe 9.6
dbadb.h
1#ifndef DBALLE_CMDLINE_DBADB_H
2#define DBALLE_CMDLINE_DBADB_H
3
4#include <dballe/file.h>
5#include <dballe/core/query.h>
6#include <dballe/cmdline/processor.h>
7#include <dballe/db/fwd.h>
8#include <list>
9#include <cstdio>
10
11namespace dballe {
12namespace cmdline {
13
14class Dbadb
15{
16protected:
17 DB& db;
18
19public:
20 Dbadb(DB& db) : db(db) {}
21
23 int do_dump(const Query& query, FILE* out);
24
26 int do_stations(const Query& query, FILE* out);
27
29 int do_export_dump(const Query& query, FILE* out);
30
32 int do_import(const std::list<std::string>& fnames, Reader& reader, const DBImportOptions& opts);
33
35 int do_import(const std::string& fname, Reader& reader, const DBImportOptions& opts);
36
38 int do_export(const Query& query, File& file, const char* output_template=NULL, const char* forced_repmemo=NULL);
39};
40
41
42}
43}
44
45#endif
Options controlling how messages are imported in the database.
Definition: db.h:65
Definition: db.h:297
File object for doing I/O on binary message streams.
Definition: file.h:18
Query used to filter DB-All.e data.
Definition: query.h:15
Definition: dbadb.h:15
int do_export(const Query &query, File &file, const char *output_template=NULL, const char *forced_repmemo=NULL)
Export messages writing them to the givne file.
int do_import(const std::list< std::string > &fnames, Reader &reader, const DBImportOptions &opts)
Import the given files.
int do_import(const std::string &fname, Reader &reader, const DBImportOptions &opts)
Import one file.
int do_dump(const Query &query, FILE *out)
Query data in the database and output results as arbitrary human readable text.
int do_stations(const Query &query, FILE *out)
Query stations in the database and output results as arbitrary human readable text.
int do_export_dump(const Query &query, FILE *out)
Export messages and dump their contents to the given file descriptor.
Definition: processor.h:179