$treeview $search $mathjax
00001 #ifndef __STDAIR_BAS_BASDBPARAMS_HPP 00002 #define __STDAIR_BAS_BASDBPARAMS_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // STL 00008 #include <iosfwd> 00009 #include <string> 00010 // Stdair 00011 #include <stdair/stdair_db.hpp> 00012 #include <stdair/basic/StructAbstract.hpp> 00013 00014 namespace stdair { 00015 00019 struct BasDBParams : public StructAbstract { 00020 public: 00021 // ///////// Getters //////// 00023 const std::string& getUser() const { 00024 return _user; 00025 } 00026 00028 const std::string& getPassword() const { 00029 return _passwd; 00030 } 00031 00033 const std::string& getHost() const { 00034 return _host; 00035 } 00036 00038 const std::string& getPort() const { 00039 return _port; 00040 } 00041 00043 const std::string& getDBName() const { 00044 return _dbname; 00045 } 00046 00047 00048 // ///////// Setters ////////// 00050 void setUser (const std::string& iUser) { 00051 _user = iUser; 00052 } 00053 00055 void setPassword (const std::string& iPasswd) { 00056 _passwd = iPasswd; 00057 } 00058 00060 void setHost (const std::string& iHost) { 00061 _host = iHost; 00062 } 00063 00065 void setPort (const std::string& iPort) { 00066 _port = iPort; 00067 } 00068 00070 void setDBName (const std::string& iDBName) { 00071 _dbname = iDBName; 00072 } 00073 00074 00075 public: 00076 // ///////// Busines methods //////// 00080 bool check() const; 00081 00082 00083 public: 00084 // ///////// Display methods //////// 00088 const std::string describe() const; 00089 00093 std::string toShortString() const; 00094 00098 std::string toString() const; 00099 00100 00101 public: 00105 BasDBParams (const std::string& iDBUser, const std::string& iDBPasswd, 00106 const std::string& iDBHost, const std::string& iDBPort, 00107 const std::string& iDBName); 00108 00112 BasDBParams(); 00113 00117 BasDBParams (const BasDBParams&); 00118 00122 ~BasDBParams(); 00123 00124 00125 private: 00126 // /////// Attributes ///////// 00128 std::string _user; 00130 std::string _passwd; 00132 std::string _host; 00134 std::string _port; 00136 std::string _dbname; 00137 }; 00138 00139 } 00140 #endif // __STDAIR_BAS_BASDBPARAMS_HPP