libwreport  2.9
dds-validator.h
1 /*
2  * bulletin/dds-validator - Validate variables of a bulletin against its data
3  * descriptor section
4  *
5  * Copyright (C) 2011 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 <wreport/bulletin.h>
27 #include <wreport/bulletin/internals.h>
28 #include <vector>
29 
30 namespace wreport {
31 namespace bulletin {
32 
39 {
40  bool is_crex;
41  void check_fits(Varinfo info, const Var& var);
42 
43 public:
50  DDSValidator(const Bulletin& b);
51 
52  virtual void do_attr(Varinfo info, unsigned var_pos, Varcode attr_code);
53  virtual void do_var(Varinfo info);
54  virtual const Var& do_semantic_var(Varinfo info);
55  virtual void do_char_data(Varcode code);
56  virtual void do_associated_field(unsigned bit_count, unsigned significance);
57 };
58 
59 }
60 }
61 
62 #endif
DDSValidator(const Bulletin &b)
Create a new DDS validator.
bulletin::Visitor that checks if the data that has been added to the bulletin subsets can actualy be ...
Definition: dds-validator.h:38
Holds a wreport variable.
Definition: var.h:50
Intermediate representation of parsed values, ordered according to a BUFR or CREX message template...
Common bulletin::Visitor base for visitors that do not modify the bulletin.
Definition: internals.h:278
virtual void do_associated_field(unsigned bit_count, unsigned significance)
Request processing of bit_count bits of associated field with the given significance.
Storage for the decoded data of a BUFR or CREX message.
Definition: bulletin.h:63
virtual const Var & do_semantic_var(Varinfo info)
Request processing, according to info, of a data variabile that is significant for controlling the en...
short unsigned int Varcode
Holds the WMO variable code of a variable.
Definition: varinfo.h:78
Smart pointer to handle/use varinfos.
Definition: varinfo.h:336
virtual void do_char_data(Varcode code)
Request processing of C05yyy character data.
virtual void do_var(Varinfo info)
Request processing, according to info, of a data variable.
virtual void do_attr(Varinfo info, unsigned var_pos, Varcode attr_code)
Request processing, according to info, of the attribute attr_code of the variable in position var_pos...