1 #ifndef DBALLE_DB_SQL_REPINFO_H 2 #define DBALLE_DB_SQL_REPINFO_H 57 Cache(
int id,
const std::string& memo,
const std::string& desc,
int prio,
const std::string& descriptor,
int tablea);
60 void dump(FILE* out)
const;
71 bool operator<(
const Memoidx& memo)
const;
90 void to_record(
int id,
Record& rec);
93 const char* get_rep_memo(
int id);
96 int get_id(
const char* rep_memo);
99 int get_priority(
int id);
117 void update(
const char* deffile,
int* added,
int* deleted,
int* updated);
122 std::map<std::string, int> get_priorities();
127 std::vector<int> ids_by_prio(
const core::Query& rec);
139 int obtain_id(
const char* memo);
142 virtual void dump(FILE* out) = 0;
158 int cache_find_by_id(
unsigned id)
const;
161 int cache_find_by_memo(
const char* memo)
const;
164 void cache_append(
unsigned id,
const char* memo,
const char* desc,
int prio,
const char* descriptor,
int tablea);
167 void rebuild_memo_idx()
const;
170 std::vector<repinfo::Cache> read_repinfo_file(
const char* deffile);
173 virtual int id_use_count(
unsigned id,
const char* name) = 0;
176 virtual void delete_entry(
unsigned id) = 0;
185 virtual void read_cache() = 0;
188 virtual void insert_auto_entry(
const char* memo) = 0;
unsigned id
Report code.
Definition: sql/repinfo.h:33
std::string new_desc
New report description used when updating the repinfo table.
Definition: sql/repinfo.h:49
std::string new_descriptor
New report descriptor used when updating the repinfo table.
Definition: sql/repinfo.h:53
std::vector< repinfo::Cache > cache
Cache of table entries.
Definition: sql/repinfo.h:146
Key/value store where keys are strings and values are wreport variables.
Definition: record.h:16
Standard dballe::Query implementation.
Definition: core/query.h:29
int prio
Report priority.
Definition: sql/repinfo.h:40
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition: cmdline.h:17
std::string desc
Report description.
Definition: sql/repinfo.h:38
repinfo cache entry
Definition: sql/repinfo.h:30
std::string memo
Report name.
Definition: sql/repinfo.h:36
std::vector< repinfo::Memoidx > memo_idx
rep_memo -> rep_cod reverse index
Definition: sql/repinfo.h:149
Fast cached access to the repinfo table.
Definition: sql/repinfo.h:77
int new_prio
New report priority used when updating the repinfo table.
Definition: sql/repinfo.h:51
unsigned new_tablea
New report A table value used when updating the repinfo table.
Definition: sql/repinfo.h:55
int id
Report code.
Definition: sql/repinfo.h:69
unsigned tablea
Report A table value (currently unused)
Definition: sql/repinfo.h:44
reverse rep_memo -> rep_cod cache entry
Definition: sql/repinfo.h:64
std::string descriptor
Report descriptor (currently unused)
Definition: sql/repinfo.h:42
std::string new_memo
New report name used when updating the repinfo table.
Definition: sql/repinfo.h:47
std::string memo
Report name.
Definition: sql/repinfo.h:67