libdballe  9.11
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 
11 namespace dballe {
12 namespace cmdline {
13 
14 class Dbadb
15 {
16 protected:
17  DB& db;
18 
19 public:
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
int do_dump(const Query &query, FILE *out)
Query data in the database and output results as arbitrary human readable text.
Options controlling how messages are imported in the database.
Definition: db.h:64
Definition: processor.h:178
Definition: dbadb.h:14
Definition: cmdline.h:18
int do_stations(const Query &query, FILE *out)
Query stations in the database and output results as arbitrary human readable text.
File object for doing I/O on binary message streams.
Definition: file.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.
Definition: db.h:296
int do_export_dump(const Query &query, FILE *out)
Export messages and dump their contents to the given file descriptor.
int do_import(const std::list< std::string > &fnames, Reader &reader, const DBImportOptions &opts)
Import the given files.
Query used to filter DB-All.e data.
Definition: query.h:14