Public Member Functions | Public Attributes

OCIPL::LoginPara Struct Reference

database login parameter structure More...

#include <ocipl.h>

Collaboration diagram for OCIPL::LoginPara:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LoginPara ()
 LoginPara (const TCHAR *username, const TCHAR *password, const TCHAR *tnsname)
void parse (const TCHAR *conn_str)

Public Attributes

tstring _tnsname
tstring _username
tstring _password
ub4 _mode

Detailed Description

database login parameter structure

Definition at line 858 of file ocipl.h.


Constructor & Destructor Documentation

OCIPL::LoginPara::LoginPara (  ) [inline]

Definition at line 866 of file ocipl.h.

     :  _mode(OCI_DEFAULT)
    {
    }
OCIPL::LoginPara::LoginPara ( const TCHAR *  username,
const TCHAR *  password,
const TCHAR *  tnsname 
) [inline]

Definition at line 872 of file ocipl.h.

     :  _username(username),
        _password(password),
        _tnsname(tnsname),
        _mode(OCI_DEFAULT)
    {
    }

Member Function Documentation

void OCIPL::LoginPara::parse ( const TCHAR *  conn_str )

Definition at line 2033 of file ocipl.cpp.

References _mode, _password, _tcsnicmp, _tnsname, _username, OCIPL::istspace(), TCHAR, TEXT, and OCIPL::tokenize().

{
    const TCHAR* ptr = conn_str;

    _username = tokenize(&ptr, TEXT("/@ "));
    _password = tokenize(&ptr, TEXT("@ "), TEXT('/'));
    _tnsname = tokenize(&ptr, TEXT(" "), TEXT('@'));

    while(istspace(*ptr))
        ++ptr;

    if (!_tcsnicmp(ptr, TEXT("as sysdba"), 9)) {
        _mode = OCI_SYSDBA;
        ptr += 9;
    } else if (!_tcsnicmp(ptr, TEXT("as sysoper"), 10)) {
        _mode = OCI_SYSDBA;
        ptr += 10;
    } else if (!_tcsnicmp(ptr, TEXT("migrate"), 7)) {
        _mode = OCI_MIGRATE;
        ptr += 7;
    }
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 863 of file ocipl.h.

Referenced by OCIPL::OciLogin::connect(), and parse().

Definition at line 862 of file ocipl.h.

Referenced by OCIPL::OciLogin::connect(), and parse().

Definition at line 860 of file ocipl.h.

Referenced by OCIPL::OciLogin::connect(), and parse().

Definition at line 861 of file ocipl.h.

Referenced by OCIPL::OciLogin::connect(), and parse().


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