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 () override
 
void dropDatabase (const std::string &) override
 Drop a db and all its collections. A DbClientConnection exception will be thrown if the database is not connected. More...
 
bool isConnected () override
 Returns whether the database is connected. More...
 
std::string messageType (const std::string &, const std::string &) override
 Return the ROS Message type of a given collection. More...
 
bool setParams (const std::string &, unsigned, float) override
 Set database connection params. More...
 
bool setTimeout (float) override
 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...
 
virtual ~DatabaseConnection ()
 

Protected Member Functions

MessageCollectionHelper::Ptr openCollectionHelper (const std::string &db_name, const std::string &collection_name) override
 

Additional Inherited Members

- Public Types inherited from warehouse_ros::DatabaseConnection
typedef boost::shared_ptr< DatabaseConnectionPtr
 

Detailed Description

Definition at line 78 of file database_loader.h.

Member Function Documentation

◆ connect()

bool warehouse_ros::DBConnectionStub::connect ( )
inlineoverridevirtual

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 121 of file database_loader.h.

◆ dropDatabase()

void warehouse_ros::DBConnectionStub::dropDatabase ( const std::string &  db_name)
inlineoverridevirtual

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 129 of file database_loader.h.

◆ isConnected()

bool warehouse_ros::DBConnectionStub::isConnected ( )
inlineoverridevirtual

Returns whether the database is connected.

Implements warehouse_ros::DatabaseConnection.

Definition at line 125 of file database_loader.h.

◆ messageType()

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

Return the ROS Message type of a given collection.

Implements warehouse_ros::DatabaseConnection.

Definition at line 133 of file database_loader.h.

◆ openCollectionHelper()

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

Implements warehouse_ros::DatabaseConnection.

Definition at line 155 of file database_loader.cpp.

◆ setParams()

bool warehouse_ros::DBConnectionStub::setParams ( const std::string &  host,
unsigned  port,
float  timeout 
)
inlineoverridevirtual

Set database connection params.

Implements warehouse_ros::DatabaseConnection.

Definition at line 113 of file database_loader.h.

◆ setTimeout()

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

Set database connection params.

Implements warehouse_ros::DatabaseConnection.

Definition at line 117 of file database_loader.h.


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


warehouse_ros
Author(s): Bhaskara Marthi , Connor Brew
autogenerated on Wed Oct 16 2024 02:42:07