Public Member Functions | Protected Member Functions | List of all members
warehouse_ros::DBConnectionStub Class Reference

#include <database_loader.h>

Inheritance diagram for warehouse_ros::DBConnectionStub:
Inheritance graph
[legend]

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< DatabaseConnectionPtr
 

Detailed Description

Definition at line 46 of file database_loader.h.

Member Function Documentation

bool warehouse_ros::DBConnectionStub::connect ( )
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.

void warehouse_ros::DBConnectionStub::dropDatabase ( const std::string &  db_name)
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.

bool warehouse_ros::DBConnectionStub::isConnected ( )
inlinevirtual

Returns whether the database is connected.

Implements warehouse_ros::DatabaseConnection.

Definition at line 61 of file database_loader.h.

std::string warehouse_ros::DBConnectionStub::messageType ( const std::string &  db_name,
const std::string &  collection_name 
)
inlinevirtual

Return the ROS Message type of a given collection.

Implements warehouse_ros::DatabaseConnection.

Definition at line 69 of file database_loader.h.

MessageCollectionHelper::Ptr warehouse_ros::DBConnectionStub::openCollectionHelper ( const std::string &  db_name,
const std::string &  collection_name 
)
inlineprotectedvirtual

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 
)
inlinevirtual

Set database connection params.

Implements warehouse_ros::DatabaseConnection.

Definition at line 49 of file database_loader.h.

bool warehouse_ros::DBConnectionStub::setTimeout ( float  timeout)
inlinevirtual

Set database connection params.

Implements warehouse_ros::DatabaseConnection.

Definition at line 53 of file database_loader.h.


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


warehouse_ros
Author(s): Bhaskara Marthi , Connor Brew
autogenerated on Fri Jun 7 2019 21:44:23