Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
warehouse_ros_mongo::MongoDatabaseConnection Class Reference

#include <database_connection.h>

Inheritance diagram for warehouse_ros_mongo::MongoDatabaseConnection:
Inheritance graph
[legend]

Public Member Functions

bool connect ()
 
void dropDatabase (const std::string &db_name)
 
bool isConnected ()
 
std::string messageType (const std::string &db_name, const std::string &collection_name)
 
 MongoDatabaseConnection ()
 
bool setParams (const std::string &host, unsigned port, float timeout)
 
bool setTimeout (float timeout)
 
- Public Member Functions inherited from warehouse_ros::DatabaseConnection
MessageCollection< M > openCollection (const std::string &db_name, const std::string &collection_name)
 
MessageCollection< M >::Ptr openCollectionPtr (const std::string &db_name, const std::string &collection_name)
 
virtual ~DatabaseConnection ()
 

Protected Member Functions

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

Protected Attributes

std::shared_ptr< mongo::DBClientConnection > conn_
 
std::string host_
 
unsigned port_
 
float timeout_
 

Additional Inherited Members

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

Detailed Description

Definition at line 47 of file database_connection.h.

Constructor & Destructor Documentation

◆ MongoDatabaseConnection()

warehouse_ros_mongo::MongoDatabaseConnection::MongoDatabaseConnection ( )

Definition at line 47 of file database_connection.cpp.

Member Function Documentation

◆ connect()

bool warehouse_ros_mongo::MongoDatabaseConnection::connect ( )
virtual

Implements warehouse_ros::DatabaseConnection.

Definition at line 72 of file database_connection.cpp.

◆ dropDatabase()

void warehouse_ros_mongo::MongoDatabaseConnection::dropDatabase ( const std::string &  db_name)
virtual

Implements warehouse_ros::DatabaseConnection.

Definition at line 108 of file database_connection.cpp.

◆ isConnected()

bool warehouse_ros_mongo::MongoDatabaseConnection::isConnected ( )
virtual

Implements warehouse_ros::DatabaseConnection.

Definition at line 103 of file database_connection.cpp.

◆ messageType()

string warehouse_ros_mongo::MongoDatabaseConnection::messageType ( const std::string &  db_name,
const std::string &  collection_name 
)
virtual

Implements warehouse_ros::DatabaseConnection.

Definition at line 115 of file database_connection.cpp.

◆ openCollectionHelper()

MessageCollectionHelper::Ptr warehouse_ros_mongo::MongoDatabaseConnection::openCollectionHelper ( const std::string &  db_name,
const std::string &  collection_name 
)
protectedvirtual

Implements warehouse_ros::DatabaseConnection.

Definition at line 125 of file database_connection.cpp.

◆ setParams()

bool warehouse_ros_mongo::MongoDatabaseConnection::setParams ( const std::string &  host,
unsigned  port,
float  timeout 
)
virtual

Implements warehouse_ros::DatabaseConnection.

Definition at line 58 of file database_connection.cpp.

◆ setTimeout()

bool warehouse_ros_mongo::MongoDatabaseConnection::setTimeout ( float  timeout)
virtual

Implements warehouse_ros::DatabaseConnection.

Definition at line 66 of file database_connection.cpp.

Member Data Documentation

◆ conn_

std::shared_ptr<mongo::DBClientConnection> warehouse_ros_mongo::MongoDatabaseConnection::conn_
protected

Definition at line 65 of file database_connection.h.

◆ host_

std::string warehouse_ros_mongo::MongoDatabaseConnection::host_
protected

Definition at line 67 of file database_connection.h.

◆ port_

unsigned warehouse_ros_mongo::MongoDatabaseConnection::port_
protected

Definition at line 68 of file database_connection.h.

◆ timeout_

float warehouse_ros_mongo::MongoDatabaseConnection::timeout_
protected

Definition at line 69 of file database_connection.h.


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


warehouse_ros_mongo
Author(s): Bhaskara Marthi , Connor Brew
autogenerated on Sat Apr 2 2022 02:29:13