#include <database_loader.h>
Public Member Functions | |
bool | connect () |
void | dropDatabase (const std::string &db_name) |
Drop a db and all its collections. A DbClientConnection exception will be thrown if the database is not connected. | |
bool | isConnected () |
Returns whether the database is connected. | |
std::string | messageType (const std::string &db_name, const std::string &collection_name) |
Return the ROS Message type of a given collection. | |
bool | setParams (const std::string &host, unsigned port, float timeout) |
Set database connection params. | |
bool | setTimeout (float timeout) |
Set database connection params. | |
Protected Member Functions | |
MessageCollectionHelper::Ptr | openCollectionHelper (const std::string &db_name, const std::string &collection_name) |
Definition at line 47 of file database_loader.h.
bool warehouse_ros::DBConnectionStub::connect | ( | ) | [inline, virtual] |
Setup the database connection. This call assumes setParams() has been previously called. Returns true if the connection was succesfully established.
Implements warehouse_ros::DatabaseConnection.
Definition at line 58 of file database_loader.h.
void warehouse_ros::DBConnectionStub::dropDatabase | ( | const std::string & | db_name | ) | [inline, virtual] |
Drop a db and all its collections. A DbClientConnection exception will be thrown if the database is not connected.
Implements warehouse_ros::DatabaseConnection.
Definition at line 66 of file database_loader.h.
bool warehouse_ros::DBConnectionStub::isConnected | ( | ) | [inline, virtual] |
Returns whether the database is connected.
Implements warehouse_ros::DatabaseConnection.
Definition at line 62 of file database_loader.h.
std::string warehouse_ros::DBConnectionStub::messageType | ( | const std::string & | db_name, |
const std::string & | collection_name | ||
) | [inline, virtual] |
Return the ROS Message type of a given collection.
Implements warehouse_ros::DatabaseConnection.
Definition at line 70 of file database_loader.h.
MessageCollectionHelper::Ptr warehouse_ros::DBConnectionStub::openCollectionHelper | ( | const std::string & | db_name, |
const std::string & | collection_name | ||
) | [inline, protected, virtual] |
Implements warehouse_ros::DatabaseConnection.
Definition at line 75 of file database_loader.h.
bool warehouse_ros::DBConnectionStub::setParams | ( | const std::string & | host, |
unsigned | port, | ||
float | timeout | ||
) | [inline, virtual] |
Set database connection params.
Implements warehouse_ros::DatabaseConnection.
Definition at line 50 of file database_loader.h.
bool warehouse_ros::DBConnectionStub::setTimeout | ( | float | timeout | ) | [inline, virtual] |
Set database connection params.
Implements warehouse_ros::DatabaseConnection.
Definition at line 54 of file database_loader.h.