#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. More... | |
bool | isConnected () |
Returns whether the database is connected. More... | |
std::string | messageType (const std::string &db_name, const std::string &collection_name) |
Return the ROS Message type of a given collection. More... | |
bool | setParams (const std::string &host, unsigned port, float timeout) |
Set database connection params. More... | |
bool | setTimeout (float timeout) |
Set database connection params. More... | |
Public Member Functions inherited from warehouse_ros::DatabaseConnection | |
template<class M > | |
MessageCollection< M > | openCollection (const std::string &db_name, const std::string &collection_name) |
Open a collection on the DB. The collection is created if it doesn't exist. A DbClientConnection exception will be thrown if the database is not connected. More... | |
template<class M > | |
MessageCollection< M >::Ptr | openCollectionPtr (const std::string &db_name, const std::string &collection_name) |
Open a collection on the DB. The collection is created if it doesn't exist. A DbClientConnection exception will be thrown if the database is not connected. More... | |
Protected Member Functions | |
MessageCollectionHelper::Ptr | openCollectionHelper (const std::string &db_name, const std::string &collection_name) |
Additional Inherited Members | |
Public Types inherited from warehouse_ros::DatabaseConnection | |
typedef boost::shared_ptr< DatabaseConnection > | Ptr |
Definition at line 46 of file database_loader.h.
|
inlinevirtual |
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 57 of file database_loader.h.
|
inlinevirtual |
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 65 of file database_loader.h.
|
inlinevirtual |
Returns whether the database is connected.
Implements warehouse_ros::DatabaseConnection.
Definition at line 61 of file database_loader.h.
|
inlinevirtual |
Return the ROS Message type of a given collection.
Implements warehouse_ros::DatabaseConnection.
Definition at line 69 of file database_loader.h.
|
inlineprotectedvirtual |
Implements warehouse_ros::DatabaseConnection.
Definition at line 75 of file database_loader.h.
|
inlinevirtual |
Set database connection params.
Implements warehouse_ros::DatabaseConnection.
Definition at line 49 of file database_loader.h.
|
inlinevirtual |
Set database connection params.
Implements warehouse_ros::DatabaseConnection.
Definition at line 53 of file database_loader.h.