OpenTREP Logo  0.6.0
C++ Open Travel Request Parsing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OPENTREP::DBParams Struct Reference

Structure modelling a database parameters. More...

#include <opentrep/DBParams.hpp>

+ Inheritance diagram for OPENTREP::DBParams:

Public Member Functions

std::string getUser () const
 
std::string getPassword () const
 
std::string getHost () const
 
std::string getPort () const
 
std::string getDBName () const
 
void setUser (const std::string &iUser)
 
void setPassword (const std::string &iPasswd)
 
void setHost (const std::string &iHost)
 
void setPort (const std::string &iPort)
 
void setDBName (const std::string &iDBName)
 
bool checkSQLite () const
 
bool checkMySQL () const
 
void toStream (std::ostream &ioOut) const
 
void fromStream (std::istream &)
 
std::string toShortString () const
 
std::string toString () const
 
std::string toMySQLConnectionString () const
 
std::string toSQLiteConnectionString () const
 
 DBParams (const std::string &iDBUser, const std::string &iDBPasswd, const std::string &iDBHost, const std::string &iDBPort, const std::string &iDBName)
 
 DBParams (const std::string &iDBName)
 
virtual ~DBParams ()
 

Detailed Description

Structure modelling a database parameters.

Definition at line 25 of file DBParams.hpp.

Constructor & Destructor Documentation

OPENTREP::DBParams::DBParams ( const std::string &  iDBUser,
const std::string &  iDBPasswd,
const std::string &  iDBHost,
const std::string &  iDBPort,
const std::string &  iDBName 
)
inline

Main constructors.

Definition at line 187 of file DBParams.hpp.

OPENTREP::DBParams::DBParams ( const std::string &  iDBName)
inline

Definition at line 193 of file DBParams.hpp.

virtual OPENTREP::DBParams::~DBParams ( )
inlinevirtual

Default Constructor. Default copy constructor. Destructor.

Definition at line 208 of file DBParams.hpp.

Member Function Documentation

std::string OPENTREP::DBParams::getUser ( ) const
inline

Get the database user name.

Definition at line 31 of file DBParams.hpp.

std::string OPENTREP::DBParams::getPassword ( ) const
inline

Get the database user password.

Definition at line 38 of file DBParams.hpp.

std::string OPENTREP::DBParams::getHost ( ) const
inline

Get the database host name.

Definition at line 45 of file DBParams.hpp.

std::string OPENTREP::DBParams::getPort ( ) const
inline

Get the database port number.

Definition at line 52 of file DBParams.hpp.

std::string OPENTREP::DBParams::getDBName ( ) const
inline

Get the database name.

Definition at line 59 of file DBParams.hpp.

void OPENTREP::DBParams::setUser ( const std::string &  iUser)
inline

Set the database user name.

Definition at line 69 of file DBParams.hpp.

void OPENTREP::DBParams::setPassword ( const std::string &  iPasswd)
inline

Set the database password.

Definition at line 76 of file DBParams.hpp.

void OPENTREP::DBParams::setHost ( const std::string &  iHost)
inline

Set the database host name.

Definition at line 83 of file DBParams.hpp.

void OPENTREP::DBParams::setPort ( const std::string &  iPort)
inline

Set the database port number.

Definition at line 90 of file DBParams.hpp.

void OPENTREP::DBParams::setDBName ( const std::string &  iDBName)
inline

Set the database name.

Definition at line 97 of file DBParams.hpp.

bool OPENTREP::DBParams::checkSQLite ( ) const
inline

Check that all the parameters are fine.

Definition at line 107 of file DBParams.hpp.

bool OPENTREP::DBParams::checkMySQL ( ) const
inline

Check that all the parameters are fine.

Definition at line 117 of file DBParams.hpp.

void OPENTREP::DBParams::toStream ( std::ostream &  ioOut) const
inlinevirtual

Dump a structure into an output stream.

Parameters
ostream&the output stream.

Implements OPENTREP::OPENTREP_Abstract.

Definition at line 133 of file DBParams.hpp.

References toString().

void OPENTREP::DBParams::fromStream ( std::istream &  )
inlinevirtual

Read a structure from an input stream.

Parameters
istream&the input stream.

Implements OPENTREP::OPENTREP_Abstract.

Definition at line 141 of file DBParams.hpp.

std::string OPENTREP::DBParams::toShortString ( ) const
inline

Get a short display of the DBParams structure.

Definition at line 147 of file DBParams.hpp.

std::string OPENTREP::DBParams::toString ( ) const
inlinevirtual

Get the serialised version of the DBParams structure.

Implements OPENTREP::OPENTREP_Abstract.

Definition at line 156 of file DBParams.hpp.

Referenced by toStream().

std::string OPENTREP::DBParams::toMySQLConnectionString ( ) const
inline

Get the serialised version of the DBParams structure.

Definition at line 165 of file DBParams.hpp.

std::string OPENTREP::DBParams::toSQLiteConnectionString ( ) const
inline

Get the serialised version of the DBParams structure.

Definition at line 175 of file DBParams.hpp.


The documentation for this struct was generated from the following file: