libdballe 9.13
dbadb.h
1#ifndef DBALLE_CMDLINE_DBADB_H
2#define DBALLE_CMDLINE_DBADB_H
3
4#include <cstdio>
5#include <dballe/cmdline/processor.h>
6#include <dballe/core/query.h>
7#include <dballe/db/fwd.h>
8#include <dballe/file.h>
9#include <list>
10
11namespace dballe {
12namespace cmdline {
13
14class Dbadb
15{
16protected:
17 DB& db;
18
19public:
20 Dbadb(DB& db) : db(db) {}
21
24 int do_dump(const Query& query, FILE* out);
25
28 int do_stations(const Query& query, FILE* out);
29
31 int do_export_dump(const Query& query, FILE* out);
32
34 int do_import(const std::list<std::string>& fnames, Reader& reader,
35 const DBImportOptions& opts);
36
38 int do_import(const std::string& fname, Reader& reader,
39 const DBImportOptions& opts);
40
42 int do_export(const Query& query, File& file,
43 const char* output_template = NULL,
44 const char* forced_repmemo = NULL);
45};
46
47} // namespace cmdline
48} // namespace dballe
49
50#endif
Options controlling how messages are imported in the database.
Definition db.h:65
Definition db.h:308
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:17
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:180