1 #ifndef CARMA_DBMS_RESULTSCACHE_H
2 #define CARMA_DBMS_RESULTSCACHE_H
18 #include "carma/util/Logger.h"
19 #include "carma/util/PthreadMutex.h"
156 log4cpp::Category& logger_;
159 static std::map<std::string,carma::dbms::Table> * tableCache_;
160 static std::map<int,std::string> * tagIDToNameMap_;
175 #endif // CARMA_DBMS_RESULTSCACHE_H
Class to mimic a db table The Table class is meant to mimic a database table.
static void closeCache()
indicate that one's use of the cache is complete.
static ResultsCache & getCache(const DBConnection *const dbc=NULL)
get the singleton instance of the ResultsCache, the specified (valid) DBConnection object will be use...
static bool cacheExists()
does the singleton currently exist?
bool tableIDExists(const std::string identifier) const
does the specified id (and hence table) exist in the table cache?
const std::map< int, std::string > & getTagIDToNameMap() const
return the map of tagIDs to canonical names
void cache(const std::string &identifier, const carma::dbms::Table &table)
return (and cache if not already done) a column listing all the tagIDs in the DB
A simple wrapper class that makes use of ::pthread_mutex_t easier in a C++ world. ...
A class for caching and retrieving results of database queries.
const carma::dbms::Table & getCurrentMonitorConfigurationTable()
get a table containing the current monitor configurations, This table is guaranteed to have exactly o...
an abstract class from which database queries may be launched.
const carma::dbms::Table & getTable(const std::string &identifier) const
get a cached table from the table cache
const carma::dbms::Table & getFullMonitorConfigurationTable()
return (and cache if not already done) a mapping of all tagIDs in the database to their corresponding...