libwreport
2.8
|
D-table with Dxxyyy aggregate code expansions. More...
#include <dtable.h>
Public Member Functions | |
const std::string & | id () const throw () |
Table ID. | |
bool | loaded () const throw () |
True if the table has been loaded. | |
void | load (const std::pair< std::string, std::string > &idfile) |
Load a table. More... | |
Opcodes | query (Varcode var) const |
Query the DTable. More... | |
Static Public Member Functions | |
static const DTable * | get (const char *id) |
Return a DTable by id, loading it if necessary. More... | |
static const DTable * | get (const std::pair< std::string, std::string > &idfile) |
Same as get(), but explicitly specifies the pathname. More... | |
Data Fields | |
std::vector< Varcode > | varcodes |
One single table with the concatenation of all the expansion varcodes. | |
std::vector< dtable::Entry > | entries |
Expansion entries with pointers inside varcodes. | |
Protected Attributes | |
std::string | m_id |
Table ID. | |
D-table with Dxxyyy aggregate code expansions.
|
static |
Return a DTable by id, loading it if necessary.
Once loaded, the table will be cached in memory for reuse, and further calls to get() will return the cached version.
The cached tables are never deallocated, so the returned pointer is valid through the whole lifetime of the program.
id | ID of the DTable data to access |
|
static |
Same as get(), but explicitly specifies the pathname.
idfile | pair of (table id, pathname of the table on disk) |
void wreport::DTable::load | ( | const std::pair< std::string, std::string > & | idfile) |
Load a table.
idfile | pair of (table id, pathname of the table on disk) |
Query the DTable.
var | entry code (i.e. DXXYYY as a wreport::Varcode WR_VAR(3, xx, yyy). |