Arc::Database Class Reference

Interface for calling database client library. More...

#include <DBInterface.h>

Inheritance diagram for Arc::Database:
Arc::MySQLDatabase

Public Member Functions

 Database ()
 Database (std::string &server, int port)
 Database (const Database &other)
virtual ~Database ()
virtual bool connect (std::string &dbname, std::string &user, std::string &password)=0
virtual bool isconnected () const =0
virtual void close ()=0
virtual bool enable_ssl (const std::string &keyfile="", const std::string &certfile="", const std::string &cafile="", const std::string &capath="")=0
virtual bool shutdown ()=0

Detailed Description

Interface for calling database client library.

For different types of database client library, different classes should be implemented by implementing this interface.


Constructor & Destructor Documentation

Arc::Database::Database (  )  [inline]

Default constructor

Arc::Database::Database ( std::string &  server,
int  port 
) [inline]

Constructor which uses the server's name(or IP address) and port as parametes

Arc::Database::Database ( const Database other  )  [inline]

Copy constructor

virtual Arc::Database::~Database (  )  [inline, virtual]

Deconstructor


Member Function Documentation

virtual void Arc::Database::close (  )  [pure virtual]

Close the connection with database server

Implemented in Arc::MySQLDatabase.

virtual bool Arc::Database::connect ( std::string &  dbname,
std::string &  user,
std::string &  password 
) [pure virtual]

Do connection with database server

Parameters:
dbname The database name which will be used.
user The username which will be used to access database.
password The password which will be used to access database.

Implemented in Arc::MySQLDatabase.

virtual bool Arc::Database::enable_ssl ( const std::string &  keyfile = "",
const std::string &  certfile = "",
const std::string &  cafile = "",
const std::string &  capath = "" 
) [pure virtual]

Enable ssl communication for the connection

Parameters:
keyfile The location of key file.
certfile The location of certificate file.
cafile The location of ca file.
capath The location of ca directory

Implemented in Arc::MySQLDatabase.

virtual bool Arc::Database::isconnected (  )  const [pure virtual]

Get the connection status

Implemented in Arc::MySQLDatabase.

virtual bool Arc::Database::shutdown (  )  [pure virtual]

Ask database server to shutdown

Implemented in Arc::MySQLDatabase.


The documentation for this class was generated from the following file:
Generated on Wed Jun 27 11:54:20 2012 for Hosting Environment (Daemon) by  doxygen 1.6.3