MysqlDBInfo Class Reference

#include <dbinfo.h>

List of all members.

Public Member Functions

 ~MysqlDBInfo ()
string getUser () const
string getPassword () const
 MysqlDBInfo ()
string getUser ()
string getPassword ()

Static Public Member Functions

static MysqlDBInfogetAuthenInfo ()

Protected Member Functions

 MysqlDBInfo ()

Private Attributes

string user
string password

Static Private Attributes

static auto_ptr< MysqlDBInfoonlyone


Detailed Description

Object to store the login information for mysql databases. Here I used a singleton design pattern. auto_ptr (from memory.h) was used to control the single instance.

Constructor & Destructor Documentation

MysqlDBInfo::MysqlDBInfo (  )  [protected]

read information from the user's home directory's .my.cnf file. Only collect user and password info if this file does not exist then it will use .pipeline.my.cnf

References ifstream(), password, user, and value.

MysqlDBInfo::~MysqlDBInfo (  )  [inline]

Nothing needs to be done because we used the auto_ptr

MysqlDBInfo::MysqlDBInfo (  ) 

read information from the user's home directory's .my.cnf file. Only collect user and password info


Member Function Documentation

string MysqlDBInfo::getUser (  )  const [inline]

Returns:
return the user name as C++ string

References user.

Referenced by alignProtein(), bufferAllProteins(), checkBadStopIndex(), checkstop(), main(), and processAll().

string MysqlDBInfo::getPassword (  )  const [inline]

static MysqlDBInfo& MysqlDBInfo::getAuthenInfo (  )  [inline, static]

This is the only method to create a MysqlDBinfo object We are implementing a singleton object.

References onlyone.

Referenced by alignProtein(), bufferAllProteins(), and main().

string MysqlDBInfo::getUser (  )  [inline]

References user.

string MysqlDBInfo::getPassword (  )  [inline]

References password.


Member Data Documentation

string MysqlDBInfo::user [private]

stores the user and password information that should not be visible in the source code

Referenced by getUser(), and MysqlDBInfo().

string MysqlDBInfo::password [private]

Referenced by getPassword(), and MysqlDBInfo().

std::auto_ptr< MysqlDBInfo > MysqlDBInfo::onlyone [static, private]

instantiate only one object

Referenced by getAuthenInfo().


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

Generated on Wed Aug 10 11:57:13 2011 for Softwares from Orpara by  doxygen 1.5.6