#include <RasdamanConnector.h>
RasdamanConnector::RasdamanConnector |
( |
int |
rasport, |
|
|
int |
pgport, |
|
|
std::string |
hostname, |
|
|
std::string |
RasDbName, |
|
|
std::string |
PetaDbName, |
|
|
std::string |
RasUser, |
|
|
std::string |
PetaUser, |
|
|
std::string |
RasPasswd, |
|
|
std::string |
PetaPasswd |
|
) |
| |
This constructor accepts individual connection parameters.
- Parameters
-
rasport | rasmgr port (e.g. 7001) |
pgport | postgres server port (e.g. 5432) |
hostname | hostname (e.g. localhost) |
RasDbName | rasdaman data base name (e.g. RASBASE) |
PetaDbName | petascope data base name |
RasUser | rasdaman data base user |
PetaUser | petascope data base user |
RasPasswd | password of rasdaman data base user |
PetaPasswd | password of petascope data base user |
RasdamanConnector::RasdamanConnector |
( |
std::string |
configfile | ) |
|
This constructor allows parsing a configuration file, which contains the required connection parameters. The configuration file is expected to have the following structure (sample file):
host=localhost rasport=7001 pgport=5432 rasdbname=RASBASE petadbname=PETASCOPE rasuser=rasdaman raspassword=rasdaman petauser=rasdaman petapassword=rasdaman
- Parameters
-
configfile | filename of the configuration file |
virtual RasdamanConnector::~RasdamanConnector |
( |
| ) |
|
|
virtual |
RasdamanConnector::RasdamanConnector |
( |
| ) |
|
|
protected |
purposely non-available constructor
void RasdamanConnector::connect |
( |
| ) |
|
Establishes a connection to the rasdaman and petascope data base(s).
void RasdamanConnector::disconnect |
( |
| ) |
|
Closes the connection to the rasdaman and petascope data base(s).
const r_Database& RasdamanConnector::getDatabase |
( |
| ) |
|
|
inline |
Yields access to the rasdaman data base object
References m_db.
std::string RasdamanConnector::getHostName |
( |
| ) |
|
|
inline |
get configured connection details
References m_sHostName.
const PGconn* RasdamanConnector::getPetaConnection |
( |
void |
| ) |
|
get a connection pointer to the petascope data base
std::string RasdamanConnector::getPetaDbName |
( |
| ) |
|
|
inline |
std::string RasdamanConnector::getPetaPGConnectString |
( |
void |
| ) |
|
get a connection string for the petascope data base which can be used with PQconnectdb()
std::string RasdamanConnector::getPetaUser |
( |
| ) |
|
|
inline |
get configured connection details
References m_PetaUser.
int RasdamanConnector::getPgPort |
( |
| ) |
|
|
inline |
Returns the port on which rasdaman tries to connect to the postgres server.
References m_iPgPort.
const PGconn* RasdamanConnector::getRasConnection |
( |
void |
| ) |
|
get a connection pointer to the rasdaman data base
std::string RasdamanConnector::getRasDbName |
( |
| ) |
|
|
inline |
get configured connection details
References m_RasDbName.
std::string RasdamanConnector::getRasPGConnectString |
( |
void |
| ) |
|
get a connection string for the rasdaman data base which can be used with PQconnectdb()
int RasdamanConnector::getRasPort |
( |
| ) |
|
|
inline |
std::string RasdamanConnector::getRasUser |
( |
| ) |
|
|
inline |
get configured connection details
References m_RasUser.
int RasdamanConnector::parseConfig |
( |
std::string |
configfile | ) |
|
throw | ( | r_Error |
| ) | | |
|
protected |
std::string RasdamanConnector::removeWhiteSpaces |
( |
std::string |
str | ) |
|
|
protected |
removes whitespaces and tabs from a given string
int RasdamanConnector::m_iPgPort |
|
protected |
int RasdamanConnector::m_iRasPort |
|
protected |
PGconn* RasdamanConnector::m_petaconn |
|
protected |
pointer to a petascope data base connection
std::string RasdamanConnector::m_PetaDbName |
|
protected |
std::string RasdamanConnector::m_PetaPasswd |
|
protected |
password of petascope data base user
std::string RasdamanConnector::m_PetaUser |
|
protected |
PGconn* RasdamanConnector::m_rasconn |
|
protected |
pointer to a rasdaman data base connection
std::string RasdamanConnector::m_RasDbName |
|
protected |
std::string RasdamanConnector::m_RasPasswd |
|
protected |
password of rasdaman data base user
std::string RasdamanConnector::m_RasUser |
|
protected |
std::string RasdamanConnector::m_sHostName |
|
protected |
The documentation for this class was generated from the following file: