libwreport 3.40
dds-validator.h
1/*
2 * bulletin/dds-validator - Validate variables of a bulletin against its data
3 * descriptor section
4 *
5 * Copyright (C) 2011--2015 ARPA-SIM <urpsim@smr.arpa.emr.it>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 * Author: Enrico Zini <enrico@enricozini.com>
21 */
22
23#ifndef WREPORT_BULLETIN_DDS_VALIDATOR_H
24#define WREPORT_BULLETIN_DDS_VALIDATOR_H
25
26#include <vector>
27#include <wreport/bulletin.h>
28#include <wreport/bulletin/internals.h>
29
30namespace wreport {
31namespace bulletin {
32
39{
40 bool is_crex;
41 void check_fits(Varinfo info, const Var& var);
42 void check_attr(Varinfo info, unsigned var_pos);
43
44public:
51 DDSValidator(const Bulletin& b, unsigned subset_idx);
52
53 // void define_bitmap(unsigned bitmap_size) override;
54 void define_substituted_value(unsigned pos) override;
55 void define_attribute(Varinfo info, unsigned pos) override;
58 void encode_var(Varinfo info, const Var& var) override;
59};
60
61} // namespace bulletin
62} // namespace wreport
63
64#endif
Storage for the decoded data of a BUFR or CREX message.
Definition bulletin.h:30
A physical variable.
Definition var.h:25
Interpreter that checks if the data that has been added to the bulletin subsets can actualy be encode...
Definition dds-validator.h:39
void define_raw_character_data(Varcode code) override
Request processing of C05yyy raw character data.
DDSValidator(const Bulletin &b, unsigned subset_idx)
Create a new DDS validator.
void encode_var(Varinfo info, const Var &var) override
Encode a variable.
void define_substituted_value(unsigned pos) override
Request processing of a substituted value corresponding to position pos in the list or previous varia...
void define_attribute(Varinfo info, unsigned pos) override
Request processing of an attribute encoded with info, related to the variable as position pos in the ...
void define_c03_refval_override(Varcode code) override
Request processing of a new value for the reference value of the given B code.
String functions.
Definition benchmark.h:13
uint16_t Varcode
Holds the WMO variable code of a variable.
Definition fwd.h:12
Information about a variable.
Definition varinfo.h:140
Base Interpreter specialisation for message encoders that works on a subset at a time.
Definition internals.h:23