1 #ifndef DBALLE_DB_V7_REPINFO_H 2 #define DBALLE_DB_V7_REPINFO_H 11 #include <dballe/core/fwd.h> 51 Cache(
int id,
const std::string& memo,
const std::string& desc,
int prio,
const std::string& descriptor,
int tablea);
54 void dump(FILE* out)
const;
65 bool operator<(
const Memoidx& memo)
const;
82 const char* get_rep_memo(
int id);
85 int get_id(
const char* rep_memo);
88 int get_priority(
const std::string& report);
104 void update(
const char* deffile,
int* added,
int* deleted,
int* updated);
109 std::map<std::string, int> get_priorities();
114 std::vector<int> ids_by_prio(
const core::Query& rec);
126 int obtain_id(
const char*
memo);
129 virtual void dump(FILE* out) = 0;
135 virtual void read_cache() = 0;
151 int cache_find_by_id(
unsigned id)
const;
154 int cache_find_by_memo(
const char* memo)
const;
160 void rebuild_memo_idx()
const;
163 std::vector<repinfo::Cache> read_repinfo_file(
const char* deffile);
166 virtual int id_use_count(
unsigned id,
const char* name) = 0;
169 virtual void delete_entry(
unsigned id) = 0;
178 virtual void insert_auto_entry(
const char* memo) = 0;
Forward declarations for public dballe/sql names.
int new_prio
New report priority used when updating the repinfo table.
Definition: repinfo.h:45
std::string memo
Report name.
Definition: repinfo.h:30
unsigned id
Report code.
Definition: repinfo.h:27
Fast cached access to the repinfo table.
Definition: repinfo.h:71
Standard dballe::Query implementation.
Definition: core/query.h:31
std::vector< repinfo::Cache > cache
Cache of table entries.
Definition: repinfo.h:139
int prio
Report priority.
Definition: repinfo.h:34
int id
Report code.
Definition: repinfo.h:63
unsigned new_tablea
New report A table value used when updating the repinfo table.
Definition: repinfo.h:49
std::string memo
Report name.
Definition: repinfo.h:61
std::string new_desc
New report description used when updating the repinfo table.
Definition: repinfo.h:43
std::vector< repinfo::Memoidx > memo_idx
rep_memo -> rep_cod reverse index
Definition: repinfo.h:142
std::string new_descriptor
New report descriptor used when updating the repinfo table.
Definition: repinfo.h:47
std::string descriptor
Report descriptor (currently unused)
Definition: repinfo.h:36
unsigned tablea
Report A table value (currently unused)
Definition: repinfo.h:38
std::string new_memo
New report name used when updating the repinfo table.
Definition: repinfo.h:41
repinfo cache entry
Definition: repinfo.h:24
std::string desc
Report description.
Definition: repinfo.h:32
reverse rep_memo -> rep_cod cache entry
Definition: repinfo.h:58