Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
rtabmap::DBDriver Class Reference

#include <DBDriver.h>

Inheritance diagram for rtabmap::DBDriver:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void addStatisticsAfterRun (int stMemSize, int lastSignAdded, int processMemUsed, int databaseMemUsed, int dictionarySize) const
void asyncSave (Signature *s)
void asyncSave (VisualWord *vw)
void beginTransaction () const
void closeConnection ()
void commit () const
void emptyTrashes (bool async=false)
void executeNoResult (const std::string &sql) const
void getAllLabels (std::map< int, std::string > &labels) const
void getAllNodeIds (std::set< int > &ids, bool ignoreChildren=false) const
double getEmptyTrashesTime () const
void getInvertedIndexNi (int signatureId, int &ni) const
void getLastNodeId (int &id) const
void getLastWordId (int &id) const
long getMemoryUsed () const
void getNodeData (int signatureId, cv::Mat &imageCompressed, cv::Mat &depthCompressed, cv::Mat &laserScanCompressed, float &fx, float &fy, float &cx, float &cy, Transform &localTransform, int &laserScanMaxPts) const
void getNodeData (int signatureId, cv::Mat &imageCompressed) const
void getNodeIdByLabel (const std::string &label, int &id) const
bool getNodeInfo (int signatureId, Transform &pose, int &mapId, int &weight, std::string &label, double &stamp, std::vector< unsigned char > &userData) const
const std::string & getUrl () const
void getWeight (int signatureId, int &weight) const
bool isConnected () const
void load (VWDictionary *dictionary) const
void loadLastNodes (std::list< Signature * > &signatures) const
void loadLinks (int signatureId, std::map< int, Link > &links, Link::Type type=Link::kUndef) const
void loadNodeData (std::list< Signature * > &signatures, bool loadMetricData) const
void loadSignatures (const std::list< int > &ids, std::list< Signature * > &signatures, std::set< int > *loadedFromTrash=0)
void loadWords (const std::set< int > &wordIds, std::list< VisualWord * > &vws)
bool openConnection (const std::string &url, bool overwritten=false)
virtual void parseParameters (const ParametersMap &parameters)
void setTimestampUpdateEnabled (bool enabled)
virtual ~DBDriver ()

Protected Member Functions

 DBDriver (const ParametersMap &parameters=ParametersMap())

Private Member Functions

virtual bool connectDatabaseQuery (const std::string &url, bool overwritten=false)=0
virtual void disconnectDatabaseQuery ()=0
virtual void executeNoResultQuery (const std::string &sql) const =0
virtual void getAllLabelsQuery (std::map< int, std::string > &labels) const =0
virtual void getAllNodeIdsQuery (std::set< int > &ids, bool ignoreChildren) const =0
virtual void getInvertedIndexNiQuery (int signatureId, int &ni) const =0
virtual void getLastIdQuery (const std::string &tableName, int &id) const =0
virtual long getMemoryUsedQuery () const =0
virtual void getNodeDataQuery (int signatureId, cv::Mat &imageCompressed, cv::Mat &depthCompressed, cv::Mat &laserScanCompressed, float &fx, float &fy, float &cx, float &cy, Transform &localTransform, int &laserScanMaxPts) const =0
virtual void getNodeDataQuery (int signatureId, cv::Mat &imageCompressed) const =0
virtual void getNodeIdByLabelQuery (const std::string &label, int &id) const =0
virtual bool getNodeInfoQuery (int signatureId, Transform &pose, int &mapId, int &weight, std::string &label, double &stamp, std::vector< unsigned char > &userData) const =0
virtual void getWeightQuery (int signatureId, int &weight) const =0
virtual bool isConnectedQuery () const =0
virtual void loadLastNodesQuery (std::list< Signature * > &signatures) const =0
virtual void loadLinksQuery (int signatureId, std::map< int, Link > &links, Link::Type type=Link::kUndef) const =0
virtual void loadNodeDataQuery (std::list< Signature * > &signatures, bool loadMetricData) const =0
virtual void loadQuery (VWDictionary *dictionary) const =0
virtual void loadSignaturesQuery (const std::list< int > &ids, std::list< Signature * > &signatures) const =0
virtual void loadWordsQuery (const std::set< int > &wordIds, std::list< VisualWord * > &vws) const =0
virtual void mainLoop ()
void saveOrUpdate (const std::vector< Signature * > &signatures) const
void saveOrUpdate (const std::vector< VisualWord * > &words) const
virtual void saveQuery (const std::list< Signature * > &signatures) const =0
virtual void saveQuery (const std::list< VisualWord * > &words) const =0
virtual void updateQuery (const std::list< Signature * > &signatures, bool updateTimestamp) const =0
virtual void updateQuery (const std::list< VisualWord * > &words, bool updateTimestamp) const =0

Private Attributes

USemaphore _addSem
UMutex _dbSafeAccessMutex
double _emptyTrashesTime
bool _timestampUpdate
UMutex _transactionMutex
UMutex _trashesMutex
std::map< int, Signature * > _trashSignatures
std::map< int, VisualWord * > _trashVisualWords
std::string _url

Detailed Description

Definition at line 60 of file DBDriver.h.


Constructor & Destructor Documentation

Definition at line 47 of file DBDriver.cpp.

rtabmap::DBDriver::DBDriver ( const ParametersMap parameters = ParametersMap()) [protected]

Definition at line 40 of file DBDriver.cpp.


Member Function Documentation

void rtabmap::DBDriver::addStatisticsAfterRun ( int  stMemSize,
int  lastSignAdded,
int  processMemUsed,
int  databaseMemUsed,
int  dictionarySize 
) const

Definition at line 703 of file DBDriver.cpp.

Definition at line 200 of file DBDriver.cpp.

Definition at line 213 of file DBDriver.cpp.

Definition at line 108 of file DBDriver.cpp.

Definition at line 57 of file DBDriver.cpp.

void rtabmap::DBDriver::commit ( ) const

Definition at line 115 of file DBDriver.cpp.

virtual bool rtabmap::DBDriver::connectDatabaseQuery ( const std::string &  url,
bool  overwritten = false 
) [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

virtual void rtabmap::DBDriver::disconnectDatabaseQuery ( ) [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

void rtabmap::DBDriver::emptyTrashes ( bool  async = false)

Definition at line 129 of file DBDriver.cpp.

void rtabmap::DBDriver::executeNoResult ( const std::string &  sql) const

Definition at line 122 of file DBDriver.cpp.

virtual void rtabmap::DBDriver::executeNoResultQuery ( const std::string &  sql) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

void rtabmap::DBDriver::getAllLabels ( std::map< int, std::string > &  labels) const

Definition at line 684 of file DBDriver.cpp.

virtual void rtabmap::DBDriver::getAllLabelsQuery ( std::map< int, std::string > &  labels) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

void rtabmap::DBDriver::getAllNodeIds ( std::set< int > &  ids,
bool  ignoreChildren = false 
) const

Definition at line 561 of file DBDriver.cpp.

virtual void rtabmap::DBDriver::getAllNodeIdsQuery ( std::set< int > &  ids,
bool  ignoreChildren 
) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

double rtabmap::DBDriver::getEmptyTrashesTime ( ) const [inline]

Definition at line 74 of file DBDriver.h.

void rtabmap::DBDriver::getInvertedIndexNi ( int  signatureId,
int &  ni 
) const

Definition at line 629 of file DBDriver.cpp.

virtual void rtabmap::DBDriver::getInvertedIndexNiQuery ( int  signatureId,
int &  ni 
) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

virtual void rtabmap::DBDriver::getLastIdQuery ( const std::string &  tableName,
int &  id 
) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

void rtabmap::DBDriver::getLastNodeId ( int &  id) const

Definition at line 599 of file DBDriver.cpp.

void rtabmap::DBDriver::getLastWordId ( int &  id) const

Definition at line 614 of file DBDriver.cpp.

Definition at line 93 of file DBDriver.cpp.

virtual long rtabmap::DBDriver::getMemoryUsedQuery ( ) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

void rtabmap::DBDriver::getNodeData ( int  signatureId,
cv::Mat &  imageCompressed,
cv::Mat &  depthCompressed,
cv::Mat &  laserScanCompressed,
float &  fx,
float &  fy,
float &  cx,
float &  cy,
Transform localTransform,
int &  laserScanMaxPts 
) const

Definition at line 413 of file DBDriver.cpp.

void rtabmap::DBDriver::getNodeData ( int  signatureId,
cv::Mat &  imageCompressed 
) const

Definition at line 455 of file DBDriver.cpp.

virtual void rtabmap::DBDriver::getNodeDataQuery ( int  signatureId,
cv::Mat &  imageCompressed,
cv::Mat &  depthCompressed,
cv::Mat &  laserScanCompressed,
float &  fx,
float &  fy,
float &  cx,
float &  cy,
Transform localTransform,
int &  laserScanMaxPts 
) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

virtual void rtabmap::DBDriver::getNodeDataQuery ( int  signatureId,
cv::Mat &  imageCompressed 
) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

void rtabmap::DBDriver::getNodeIdByLabel ( const std::string &  label,
int &  id 
) const

Definition at line 649 of file DBDriver.cpp.

virtual void rtabmap::DBDriver::getNodeIdByLabelQuery ( const std::string &  label,
int &  id 
) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

bool rtabmap::DBDriver::getNodeInfo ( int  signatureId,
Transform pose,
int &  mapId,
int &  weight,
std::string &  label,
double &  stamp,
std::vector< unsigned char > &  userData 
) const

Definition at line 479 of file DBDriver.cpp.

virtual bool rtabmap::DBDriver::getNodeInfoQuery ( int  signatureId,
Transform pose,
int &  mapId,
int &  weight,
std::string &  label,
double &  stamp,
std::vector< unsigned char > &  userData 
) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

const std::string& rtabmap::DBDriver::getUrl ( ) const [inline]

Definition at line 66 of file DBDriver.h.

void rtabmap::DBDriver::getWeight ( int  signatureId,
int &  weight 
) const

Definition at line 541 of file DBDriver.cpp.

virtual void rtabmap::DBDriver::getWeightQuery ( int  signatureId,
int &  weight 
) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

Definition at line 83 of file DBDriver.cpp.

virtual bool rtabmap::DBDriver::isConnectedQuery ( ) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

void rtabmap::DBDriver::load ( VWDictionary dictionary) const

Definition at line 285 of file DBDriver.cpp.

void rtabmap::DBDriver::loadLastNodes ( std::list< Signature * > &  signatures) const

Definition at line 292 of file DBDriver.cpp.

virtual void rtabmap::DBDriver::loadLastNodesQuery ( std::list< Signature * > &  signatures) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

void rtabmap::DBDriver::loadLinks ( int  signatureId,
std::map< int, Link > &  links,
Link::Type  type = Link::kUndef 
) const

Definition at line 511 of file DBDriver.cpp.

virtual void rtabmap::DBDriver::loadLinksQuery ( int  signatureId,
std::map< int, Link > &  links,
Link::Type  type = Link::kUndef 
) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

void rtabmap::DBDriver::loadNodeData ( std::list< Signature * > &  signatures,
bool  loadMetricData 
) const

Definition at line 393 of file DBDriver.cpp.

virtual void rtabmap::DBDriver::loadNodeDataQuery ( std::list< Signature * > &  signatures,
bool  loadMetricData 
) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

virtual void rtabmap::DBDriver::loadQuery ( VWDictionary dictionary) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

void rtabmap::DBDriver::loadSignatures ( const std::list< int > &  ids,
std::list< Signature * > &  signatures,
std::set< int > *  loadedFromTrash = 0 
)

Definition at line 299 of file DBDriver.cpp.

virtual void rtabmap::DBDriver::loadSignaturesQuery ( const std::list< int > &  ids,
std::list< Signature * > &  signatures 
) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

void rtabmap::DBDriver::loadWords ( const std::set< int > &  wordIds,
std::list< VisualWord * > &  vws 
)

Definition at line 352 of file DBDriver.cpp.

virtual void rtabmap::DBDriver::loadWordsQuery ( const std::set< int > &  wordIds,
std::list< VisualWord * > &  vws 
) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

void rtabmap::DBDriver::mainLoop ( ) [private, virtual]

Pure virtual method mainLoop(). The inner loop of the thread. This method is called repetitively until the thread is killed. Note that if kill() is called in mainLoopBegin(), mainLoop() is not called, terminating immediately the thread.

See also:
mainLoop()
kill()

Implements UThread.

Definition at line 102 of file DBDriver.cpp.

bool rtabmap::DBDriver::openConnection ( const std::string &  url,
bool  overwritten = false 
)

Definition at line 69 of file DBDriver.cpp.

void rtabmap::DBDriver::parseParameters ( const ParametersMap parameters) [virtual]

Reimplemented in rtabmap::DBDriverSqlite3.

Definition at line 53 of file DBDriver.cpp.

void rtabmap::DBDriver::saveOrUpdate ( const std::vector< Signature * > &  signatures) const [private]

Definition at line 225 of file DBDriver.cpp.

void rtabmap::DBDriver::saveOrUpdate ( const std::vector< VisualWord * > &  words) const [private]

Definition at line 255 of file DBDriver.cpp.

virtual void rtabmap::DBDriver::saveQuery ( const std::list< Signature * > &  signatures) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

virtual void rtabmap::DBDriver::saveQuery ( const std::list< VisualWord * > &  words) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

void rtabmap::DBDriver::setTimestampUpdateEnabled ( bool  enabled) [inline]

Definition at line 75 of file DBDriver.h.

virtual void rtabmap::DBDriver::updateQuery ( const std::list< Signature * > &  signatures,
bool  updateTimestamp 
) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.

virtual void rtabmap::DBDriver::updateQuery ( const std::list< VisualWord * > &  words,
bool  updateTimestamp 
) const [private, pure virtual]

Implemented in rtabmap::DBDriverSqlite3.


Member Data Documentation

Definition at line 160 of file DBDriver.h.

Definition at line 159 of file DBDriver.h.

Definition at line 161 of file DBDriver.h.

Definition at line 163 of file DBDriver.h.

Definition at line 155 of file DBDriver.h.

Definition at line 158 of file DBDriver.h.

std::map<int, Signature *> rtabmap::DBDriver::_trashSignatures [private]

Definition at line 156 of file DBDriver.h.

Definition at line 157 of file DBDriver.h.

std::string rtabmap::DBDriver::_url [private]

Definition at line 162 of file DBDriver.h.


The documentation for this class was generated from the following files:


rtabmap
Author(s): Mathieu Labbe
autogenerated on Fri Aug 28 2015 12:51:44