libdballe 9.6
data.h
1#ifndef DBALLE_DATA_H
2#define DBALLE_DATA_H
3
4#include <dballe/fwd.h>
5#include <dballe/types.h>
6#include <wreport/var.h>
7#include <memory>
8
9namespace dballe {
10
17class Data
18{
19public:
20 virtual ~Data() {}
21
23 static std::unique_ptr<Data> create();
24
26 virtual void clear() = 0;
27
29 virtual void clear_ids() = 0;
30
32 virtual void clear_vars() = 0;
33
35 virtual bool operator==(const Data& rec) const = 0;
36
38 virtual bool operator!=(const Data& rec) const = 0;
39
41 virtual void print(FILE* out) const = 0;
42};
43
44}
45#endif
46
Key/value store where keys are strings and values are wreport variables.
Definition: data.h:18
virtual bool operator!=(const Data &rec) const =0
Check if two records differ.
virtual void clear_ids()=0
Unset all database IDs in station and values.
virtual void print(FILE *out) const =0
Print the contents of this record to the given stream.
virtual bool operator==(const Data &rec) const =0
Check if two records are the same.
virtual void clear()=0
Remove all contents from the record.
virtual void clear_vars()=0
Remove all Bxxyyy keys from the record, leaving the rest intact.
static std::unique_ptr< Data > create()
Create a new Record.
Common base types used by most of DB-All.e code.