dds-validator.h
/*
* bulletin/dds-validator - Validate variables of a bulletin against its data
* descriptor section
*
* Copyright (C) 2011--2015 ARPA-SIM <urpsim@smr.arpa.emr.it>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author: Enrico Zini <enrico@enricozini.com>
*/
#ifndef WREPORT_BULLETIN_DDS_VALIDATOR_H
#define WREPORT_BULLETIN_DDS_VALIDATOR_H
#include <wreport/bulletin.h>
#include <wreport/bulletin/internals.h>
#include <vector>
namespace wreport {
namespace bulletin {
class DDSValidator : public UncompressedEncoder
{
bool is_crex;
void check_fits(Varinfo info, const Var& var);
void check_attr(Varinfo info, unsigned var_pos);
public:
DDSValidator(const Bulletin& b, unsigned subset_idx);
//void define_bitmap(unsigned bitmap_size) override;
void define_substituted_value(unsigned pos) override;
void define_attribute(Varinfo info, unsigned pos) override;
void define_raw_character_data(Varcode code) override;
void define_c03_refval_override(Varcode code) override;
void encode_var(Varinfo info, const Var& var) override;
};
}
}
#endif
wreport::Bulletin
Storage for the decoded data of a BUFR or CREX message.
Definition bulletin.h:30
wreport::Var
A physical variable.
Definition var.h:25
wreport::bulletin::DDSValidator::define_raw_character_data
void define_raw_character_data(Varcode code) override
Request processing of C05yyy raw character data.
wreport::bulletin::DDSValidator::DDSValidator
DDSValidator(const Bulletin &b, unsigned subset_idx)
Create a new DDS validator.
wreport::bulletin::DDSValidator::encode_var
void encode_var(Varinfo info, const Var &var) override
Encode a variable.
wreport::bulletin::DDSValidator::define_substituted_value
void define_substituted_value(unsigned pos) override
Request processing of a substituted value corresponding to position pos in the list or previous varia...
wreport::bulletin::DDSValidator::define_attribute
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 ...
wreport::bulletin::DDSValidator::define_c03_refval_override
void define_c03_refval_override(Varcode code) override
Request processing of a new value for the reference value of the given B code.
wreport::bulletin
The bulletin namespace contains bulletin implementation details, internals and utility functions.
Definition input.h:13
wreport
String functions.
Definition benchmark.h:13
wreport::Varinfo
const _Varinfo * Varinfo
Varinfo reference.
Definition fwd.h:11
wreport::Varcode
uint16_t Varcode
Holds the WMO variable code of a variable.
Definition fwd.h:12