OpenTREP Logo  0.07.18
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
OPENTREP::DBParams Struct Reference

Structure holding the database parameters. More...

#include <opentrep/DBParams.hpp>

+ Inheritance diagram for OPENTREP::DBParams:

Public Member Functions

const DBTypegetType () const
 
const std::string & getUser () const
 
const std::string & getPassword () const
 
const std::string & getHost () const
 
const std::string & getPort () const
 
const std::string & getDBName () const
 
void setType (const DBType &iType)
 
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 DBType &iDBType, const std::string &iDBUser, const std::string &iDBPasswd, const std::string &iDBHost, const std::string &iDBPort, const std::string &iDBName)
 
 DBParams (const DBType &iDBType, const std::string &iDBName)
 
virtual ~DBParams ()
 

Detailed Description

Structure holding the database parameters.

Definition at line 26 of file DBParams.hpp.

Constructor & Destructor Documentation

◆ DBParams() [1/2]

OPENTREP::DBParams::DBParams ( const DBType & iDBType,
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 202 of file DBParams.hpp.

◆ DBParams() [2/2]

OPENTREP::DBParams::DBParams ( const DBType & iDBType,
const std::string & iDBName )
inline

Definition at line 209 of file DBParams.hpp.

◆ ~DBParams()

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

Default Constructor. Default copy constructor. Destructor.

Definition at line 225 of file DBParams.hpp.

Member Function Documentation

◆ getType()

const DBType & OPENTREP::DBParams::getType ( ) const
inline

Get the database type.

Definition at line 32 of file DBParams.hpp.

◆ getUser()

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

Get the database user name.

Definition at line 39 of file DBParams.hpp.

◆ getPassword()

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

Get the database user password.

Definition at line 46 of file DBParams.hpp.

◆ getHost()

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

Get the database host name.

Definition at line 53 of file DBParams.hpp.

◆ getPort()

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

Get the database port number.

Definition at line 60 of file DBParams.hpp.

◆ getDBName()

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

Get the database name.

Definition at line 67 of file DBParams.hpp.

◆ setType()

void OPENTREP::DBParams::setType ( const DBType & iType)
inline

Set the database type.

Definition at line 77 of file DBParams.hpp.

◆ setUser()

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

Set the database user name.

Definition at line 84 of file DBParams.hpp.

◆ setPassword()

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

Set the database password.

Definition at line 91 of file DBParams.hpp.

◆ setHost()

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

Set the database host name.

Definition at line 98 of file DBParams.hpp.

◆ setPort()

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

Set the database port number.

Definition at line 105 of file DBParams.hpp.

◆ setDBName()

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

Set the database name.

Definition at line 112 of file DBParams.hpp.

◆ checkSQLite()

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

Check that all the parameters are fine.

Definition at line 122 of file DBParams.hpp.

◆ checkMySQL()

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

Check that all the parameters are fine.

Definition at line 132 of file DBParams.hpp.

◆ toStream()

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

Dump the structure into an output stream.

Parameters
ostream&the output stream.

Implements OPENTREP::OPENTREP_Abstract.

Definition at line 148 of file DBParams.hpp.

References toString().

◆ fromStream()

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

Read the structure from an input stream.

Parameters
istream&the input stream.

Implements OPENTREP::OPENTREP_Abstract.

Definition at line 156 of file DBParams.hpp.

◆ toShortString()

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

Get a short display of the DBParams structure.

Definition at line 162 of file DBParams.hpp.

◆ toString()

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

Get the serialised version of the DBParams structure.

Implements OPENTREP::OPENTREP_Abstract.

Definition at line 171 of file DBParams.hpp.

Referenced by toStream().

◆ toMySQLConnectionString()

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

Get the serialised version of the DBParams structure.

Definition at line 180 of file DBParams.hpp.

◆ toSQLiteConnectionString()

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

Get the serialised version of the DBParams structure.

Definition at line 190 of file DBParams.hpp.


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