1#ifndef WREPORT_TABLEDIR_H
2#define WREPORT_TABLEDIR_H
7#include <wreport/tableinfo.h>
18 std::string btable_id;
19 std::filesystem::path btable_pathname;
20 std::string dtable_id;
21 std::filesystem::path dtable_pathname;
23 Table(
const std::filesystem::path& dirname,
const std::string& filename);
26 virtual void print_id(FILE* out)
const;
30struct BufrTable : Table
34 BufrTable(
const BufrTableID&
id,
const std::string& dirname,
35 const std::string& filename)
36 : Table(dirname, filename), id(
id)
40 void print_id(FILE* out)
const override;
44struct CrexTable : Table
48 CrexTable(
const CrexTableID&
id,
const std::string& dirname,
49 const std::string& filename)
50 : Table(dirname, filename), id(
id)
54 void print_id(FILE* out)
const override;
62 std::vector<Table*> tables;
64 Dir(
const std::string& pathname);
65 Dir(
const Dir&) =
delete;
69 Dir& operator=(
const Dir&) =
delete;
78 std::vector<std::string> dirs;
83 Tabledirs(
const Tabledirs&) =
delete;
86 Tabledirs& operator=(
const Tabledirs&) =
delete;
Identifying information for one distinct instance of BUFR tables.
Definition tableinfo.h:15
Identifying information for one distinct instance of CREX tables.
Definition tableinfo.h:63
BUFR/CREX table D with Dxxyyy aggregate code expansions.
Definition dtable.h:15
Holds a variable information table.
Definition vartable.h:31
const tabledir::Table * find(const std::string &basename)
Find a BUFR or CREX table by file name.
void add_default_directories()
Add the default directories according to compile-time and environment variables.
void explain_find_bufr(const BufrTableID &id, FILE *out)
Print the step by step process by which a table is selected for id.
const tabledir::Table * find_bufr(const BufrTableID &id)
Find a BUFR table.
static Tabledirs & get()
Get the default tabledir instance.
void add_directory(const std::string &dir)
Add a table directory to this collection.
void print(FILE *out)
Print a list of all tables found.
void explain_find_crex(const CrexTableID &id, FILE *out)
Print the step by step process by which a table is selected for id.
const tabledir::Table * find_crex(const CrexTableID &id)
Find a CREX table.
String functions.
Definition benchmark.h:13
void refresh()
Reread the directory contents if it has changed.