#include <DBDriverSqlite3.h>
Public Member Functions | |
DBDriverSqlite3 (const ParametersMap ¶meters=ParametersMap()) | |
virtual void | parseParameters (const ParametersMap ¶meters) |
void | setCacheSize (unsigned int cacheSize) |
void | setDbInMemory (bool dbInMemory) |
void | setJournalMode (int journalMode) |
void | setSynchronous (int synchronous) |
void | setTempStore (int tempStore) |
virtual | ~DBDriverSqlite3 () |
Private Member Functions | |
virtual void | addLinkQuery (const Link &link) const |
virtual bool | connectDatabaseQuery (const std::string &url, bool overwritten=false) |
virtual void | disconnectDatabaseQuery (bool save=true) |
virtual void | executeNoResultQuery (const std::string &sql) const |
virtual void | getAllLabelsQuery (std::map< int, std::string > &labels) const |
virtual void | getAllLinksQuery (std::multimap< int, Link > &links, bool ignoreNullLinks) const |
virtual void | getAllNodeIdsQuery (std::set< int > &ids, bool ignoreChildren, bool ignoreBadSignatures) const |
virtual bool | getCalibrationQuery (int signatureId, std::vector< CameraModel > &models, StereoCameraModel &stereoModel) const |
virtual bool | getDatabaseVersionQuery (std::string &version) const |
virtual long | getDepthImagesMemoryUsedQuery () const |
virtual long | getImagesMemoryUsedQuery () const |
virtual void | getInvertedIndexNiQuery (int signatureId, int &ni) const |
virtual long | getLaserScansMemoryUsedQuery () const |
virtual int | getLastDictionarySizeQuery () const |
virtual void | getLastIdQuery (const std::string &tableName, int &id) const |
virtual int | getLastNodesSizeQuery () const |
virtual ParametersMap | getLastParametersQuery () const |
virtual long | getMemoryUsedQuery () const |
virtual void | getNodeIdByLabelQuery (const std::string &label, int &id) const |
virtual bool | getNodeInfoQuery (int signatureId, Transform &pose, int &mapId, int &weight, std::string &label, double &stamp, Transform &groundTruthPose) const |
virtual int | getTotalDictionarySizeQuery () const |
virtual int | getTotalNodesSizeQuery () const |
virtual long | getUserDataMemoryUsedQuery () const |
virtual void | getWeightQuery (int signatureId, int &weight) const |
virtual long | getWordsMemoryUsedQuery () const |
virtual bool | isConnectedQuery () const |
virtual void | loadLastNodesQuery (std::list< Signature * > &signatures) const |
virtual void | loadLinksQuery (int signatureId, std::map< int, Link > &links, Link::Type type=Link::kUndef) const |
void | loadLinksQuery (std::list< Signature * > &signatures) const |
virtual void | loadNodeDataQuery (std::list< Signature * > &signatures) const |
int | loadOrSaveDb (sqlite3 *pInMemory, const std::string &fileName, int isSave) const |
virtual void | loadQuery (VWDictionary *dictionary) const |
virtual void | loadSignaturesQuery (const std::list< int > &ids, std::list< Signature * > &signatures) const |
virtual void | loadWordsQuery (const std::set< int > &wordIds, std::list< VisualWord * > &vws) const |
std::string | queryStepDepth () const |
std::string | queryStepImage () const |
std::string | queryStepKeypoint () const |
std::string | queryStepLink () const |
std::string | queryStepLinkUpdate () const |
std::string | queryStepNode () const |
std::string | queryStepSensorData () const |
std::string | queryStepWordsChanged () const |
virtual void | saveQuery (const std::list< Signature * > &signatures) const |
virtual void | saveQuery (const std::list< VisualWord * > &words) const |
void | stepDepth (sqlite3_stmt *ppStmt, const SensorData &sensorData) const |
void | stepImage (sqlite3_stmt *ppStmt, int id, const cv::Mat &imageBytes) const |
void | stepKeypoint (sqlite3_stmt *ppStmt, int signatureId, int wordId, const cv::KeyPoint &kp, const cv::Point3f &pt, const cv::Mat &descriptor) const |
void | stepLink (sqlite3_stmt *ppStmt, const Link &link) const |
void | stepNode (sqlite3_stmt *ppStmt, const Signature *s) const |
void | stepSensorData (sqlite3_stmt *ppStmt, const SensorData &sensorData) const |
void | stepWordsChanged (sqlite3_stmt *ppStmt, int signatureId, int oldWordId, int newWordId) const |
virtual void | updateLinkQuery (const Link &link) const |
virtual void | updateQuery (const std::list< Signature * > &signatures, bool updateTimestamp) const |
virtual void | updateQuery (const std::list< VisualWord * > &words, bool updateTimestamp) const |
Private Attributes | |
unsigned int | _cacheSize |
bool | _dbInMemory |
int | _journalMode |
sqlite3 * | _ppDb |
int | _synchronous |
int | _tempStore |
std::string | _version |
Definition at line 38 of file DBDriverSqlite3.h.
rtabmap::DBDriverSqlite3::DBDriverSqlite3 | ( | const ParametersMap & | parameters = ParametersMap() | ) |
Definition at line 42 of file DBDriverSqlite3.cpp.
rtabmap::DBDriverSqlite3::~DBDriverSqlite3 | ( | ) | [virtual] |
Definition at line 56 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::addLinkQuery | ( | const Link & | link | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 2890 of file DBDriverSqlite3.cpp.
bool rtabmap::DBDriverSqlite3::connectDatabaseQuery | ( | const std::string & | url, |
bool | overwritten = false |
||
) | [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 311 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::disconnectDatabaseQuery | ( | bool | save = true | ) | [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 393 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::executeNoResultQuery | ( | const std::string & | sql | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 433 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::getAllLabelsQuery | ( | std::map< int, std::string > & | labels | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 1573 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::getAllLinksQuery | ( | std::multimap< int, Link > & | links, |
bool | ignoreNullLinks | ||
) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 1353 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::getAllNodeIdsQuery | ( | std::set< int > & | ids, |
bool | ignoreChildren, | ||
bool | ignoreBadSignatures | ||
) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 1310 of file DBDriverSqlite3.cpp.
bool rtabmap::DBDriverSqlite3::getCalibrationQuery | ( | int | signatureId, |
std::vector< CameraModel > & | models, | ||
StereoCameraModel & | stereoModel | ||
) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 1063 of file DBDriverSqlite3.cpp.
bool rtabmap::DBDriverSqlite3::getDatabaseVersionQuery | ( | std::string & | version | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 272 of file DBDriverSqlite3.cpp.
long rtabmap::DBDriverSqlite3::getDepthImagesMemoryUsedQuery | ( | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 490 of file DBDriverSqlite3.cpp.
long rtabmap::DBDriverSqlite3::getImagesMemoryUsedQuery | ( | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 458 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::getInvertedIndexNiQuery | ( | int | signatureId, |
int & | ni | ||
) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 1498 of file DBDriverSqlite3.cpp.
long rtabmap::DBDriverSqlite3::getLaserScansMemoryUsedQuery | ( | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 522 of file DBDriverSqlite3.cpp.
int rtabmap::DBDriverSqlite3::getLastDictionarySizeQuery | ( | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 638 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::getLastIdQuery | ( | const std::string & | tableName, |
int & | id | ||
) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 1459 of file DBDriverSqlite3.cpp.
int rtabmap::DBDriverSqlite3::getLastNodesSizeQuery | ( | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 614 of file DBDriverSqlite3.cpp.
ParametersMap rtabmap::DBDriverSqlite3::getLastParametersQuery | ( | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 711 of file DBDriverSqlite3.cpp.
long rtabmap::DBDriverSqlite3::getMemoryUsedQuery | ( | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 446 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::getNodeIdByLabelQuery | ( | const std::string & | label, |
int & | id | ||
) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 1543 of file DBDriverSqlite3.cpp.
bool rtabmap::DBDriverSqlite3::getNodeInfoQuery | ( | int | signatureId, |
Transform & | pose, | ||
int & | mapId, | ||
int & | weight, | ||
std::string & | label, | ||
double & | stamp, | ||
Transform & | groundTruthPose | ||
) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 1219 of file DBDriverSqlite3.cpp.
int rtabmap::DBDriverSqlite3::getTotalDictionarySizeQuery | ( | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 686 of file DBDriverSqlite3.cpp.
int rtabmap::DBDriverSqlite3::getTotalNodesSizeQuery | ( | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 662 of file DBDriverSqlite3.cpp.
long rtabmap::DBDriverSqlite3::getUserDataMemoryUsedQuery | ( | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 554 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::getWeightQuery | ( | int | signatureId, |
int & | weight | ||
) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 1613 of file DBDriverSqlite3.cpp.
long rtabmap::DBDriverSqlite3::getWordsMemoryUsedQuery | ( | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 590 of file DBDriverSqlite3.cpp.
bool rtabmap::DBDriverSqlite3::isConnectedQuery | ( | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 427 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::loadLastNodesQuery | ( | std::list< Signature * > & | signatures | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 2019 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::loadLinksQuery | ( | int | signatureId, |
std::map< int, Link > & | links, | ||
Link::Type | type = Link::kUndef |
||
) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 2237 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::loadLinksQuery | ( | std::list< Signature * > & | signatures | ) | const [private] |
Definition at line 2363 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::loadNodeDataQuery | ( | std::list< Signature * > & | signatures | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 747 of file DBDriverSqlite3.cpp.
int rtabmap::DBDriverSqlite3::loadOrSaveDb | ( | sqlite3 * | pInMemory, |
const std::string & | fileName, | ||
int | isSave | ||
) | const [private] |
Definition at line 225 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::loadQuery | ( | VWDictionary * | dictionary | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 2060 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::loadSignaturesQuery | ( | const std::list< int > & | ids, |
std::list< Signature * > & | signatures | ||
) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 1648 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::loadWordsQuery | ( | const std::set< int > & | wordIds, |
std::list< VisualWord * > & | vws | ||
) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 2144 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::parseParameters | ( | const ParametersMap & | parameters | ) | [virtual] |
Reimplemented from rtabmap::DBDriver.
Definition at line 61 of file DBDriverSqlite3.cpp.
std::string rtabmap::DBDriverSqlite3::queryStepDepth | ( | ) | const [private] |
Definition at line 3073 of file DBDriverSqlite3.cpp.
std::string rtabmap::DBDriverSqlite3::queryStepImage | ( | ) | const [private] |
Definition at line 3033 of file DBDriverSqlite3.cpp.
std::string rtabmap::DBDriverSqlite3::queryStepKeypoint | ( | ) | const [private] |
Definition at line 3474 of file DBDriverSqlite3.cpp.
std::string rtabmap::DBDriverSqlite3::queryStepLink | ( | ) | const [private] |
Definition at line 3364 of file DBDriverSqlite3.cpp.
std::string rtabmap::DBDriverSqlite3::queryStepLinkUpdate | ( | ) | const [private] |
Definition at line 3345 of file DBDriverSqlite3.cpp.
std::string rtabmap::DBDriverSqlite3::queryStepNode | ( | ) | const [private] |
Definition at line 2945 of file DBDriverSqlite3.cpp.
std::string rtabmap::DBDriverSqlite3::queryStepSensorData | ( | ) | const [private] |
Definition at line 3183 of file DBDriverSqlite3.cpp.
std::string rtabmap::DBDriverSqlite3::queryStepWordsChanged | ( | ) | const [private] |
Definition at line 3448 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::saveQuery | ( | const std::list< Signature * > & | signatures | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 2680 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::saveQuery | ( | const std::list< VisualWord * > & | words | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 2833 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::setCacheSize | ( | unsigned int | cacheSize | ) |
Definition at line 87 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::setDbInMemory | ( | bool | dbInMemory | ) |
Definition at line 188 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::setJournalMode | ( | int | journalMode | ) |
Definition at line 98 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::setSynchronous | ( | int | synchronous | ) |
Definition at line 132 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::setTempStore | ( | int | tempStore | ) |
Definition at line 160 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::stepDepth | ( | sqlite3_stmt * | ppStmt, |
const SensorData & | sensorData | ||
) | const [private] |
Definition at line 3089 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::stepImage | ( | sqlite3_stmt * | ppStmt, |
int | id, | ||
const cv::Mat & | imageBytes | ||
) | const [private] |
Definition at line 3038 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::stepKeypoint | ( | sqlite3_stmt * | ppStmt, |
int | signatureId, | ||
int | wordId, | ||
const cv::KeyPoint & | kp, | ||
const cv::Point3f & | pt, | ||
const cv::Mat & | descriptor | ||
) | const [private] |
Definition at line 3482 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::stepLink | ( | sqlite3_stmt * | ppStmt, |
const Link & | link | ||
) | const [private] |
Definition at line 3384 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::stepNode | ( | sqlite3_stmt * | ppStmt, |
const Signature * | s | ||
) | const [private] |
Definition at line 2965 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::stepSensorData | ( | sqlite3_stmt * | ppStmt, |
const SensorData & | sensorData | ||
) | const [private] |
Definition at line 3199 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::stepWordsChanged | ( | sqlite3_stmt * | ppStmt, |
int | signatureId, | ||
int | oldWordId, | ||
int | newWordId | ||
) | const [private] |
Definition at line 3452 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::updateLinkQuery | ( | const Link & | link | ) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 2918 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::updateQuery | ( | const std::list< Signature * > & | signatures, |
bool | updateTimestamp | ||
) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 2497 of file DBDriverSqlite3.cpp.
void rtabmap::DBDriverSqlite3::updateQuery | ( | const std::list< VisualWord * > & | words, |
bool | updateTimestamp | ||
) | const [private, virtual] |
Implements rtabmap::DBDriver.
Definition at line 2640 of file DBDriverSqlite3.cpp.
unsigned int rtabmap::DBDriverSqlite3::_cacheSize [private] |
Definition at line 124 of file DBDriverSqlite3.h.
bool rtabmap::DBDriverSqlite3::_dbInMemory [private] |
Definition at line 123 of file DBDriverSqlite3.h.
int rtabmap::DBDriverSqlite3::_journalMode [private] |
Definition at line 125 of file DBDriverSqlite3.h.
sqlite3* rtabmap::DBDriverSqlite3::_ppDb [private] |
Definition at line 121 of file DBDriverSqlite3.h.
int rtabmap::DBDriverSqlite3::_synchronous [private] |
Definition at line 126 of file DBDriverSqlite3.h.
int rtabmap::DBDriverSqlite3::_tempStore [private] |
Definition at line 127 of file DBDriverSqlite3.h.
std::string rtabmap::DBDriverSqlite3::_version [private] |
Definition at line 122 of file DBDriverSqlite3.h.