1#ifndef WREPORT_INTERNALS_VARTABLE_H
2#define WREPORT_INTERNALS_VARTABLE_H
6#include <wreport/fwd.h>
8#include <wreport/vartable.h>
10namespace wreport::vartable {
39 Entry(
const Entry& other,
int new_scale,
unsigned new_bit_len,
48 int new_bit_ref)
const;
72 explicit Base(
const std::filesystem::path&
pathname);
83 int new_bit_ref)
const override;
Holds a variable information table.
Definition vartable.h:31
std::string pathname() const override
Return the pathname of the file from which this table has been loaded.
Definition internals/vartable.h:74
Varinfo query(Varcode code) const override
Query the Vartable.
bool contains(Varcode code) const override
Check if the code can be resolved to a varinfo.
bool iterate(std::function< bool(Varinfo)> dest) const override
Iterate the whole contents of the table.
std::vector< Entry > entries
Entries in this Vartable.
Definition internals/vartable.h:70
Varinfo query_altered(Varcode code, int new_scale, unsigned new_bit_len, int new_bit_ref) const override
Query an altered version of the vartable.
std::filesystem::path path() const override
Return the pathname of the file from which this table has been loaded.
Definition internals/vartable.h:76
std::filesystem::path m_pathname
Pathname to the file from which this vartable has been loaded.
Definition internals/vartable.h:56
const _Varinfo * Varinfo
Varinfo reference.
Definition fwd.h:11
uint16_t Varcode
Holds the WMO variable code of a variable.
Definition fwd.h:12
Information about a variable.
Definition varinfo.h:140
Bufr(const std::filesystem::path &pathname)
Create and load a BUFR B table.
Crex(const std::filesystem::path &pathname)
Create and load a CREX B table.
Definition internals/vartable.h:13
Entry * alterations
Altered versions of this Varinfo.
Definition internals/vartable.h:32
_Varinfo varinfo
Master Varinfo structure for this entry.
Definition internals/vartable.h:20
const Entry * get_alteration(int new_scale, unsigned new_bit_len, int new_bit_ref) const
Search for this alteration in the alteration chain.
Entry(const Entry &other, int new_scale, unsigned new_bit_len, int new_bit_ref)
Build an altered entry created for BUFR table C modifiers.
Implement fast access to information about WMO variables.