NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
ctlib::Connection Class Reference

Search Toolkit Book for ctlib::Connection

#include <dbapi/driver/ctlib/interfaces.hpp>

+ Collaboration diagram for ctlib::Connection:

Public Member Functions

 Connection (CTLibContext &context, CTL_Connection &ctl_conn)
 
 ~Connection (void) noexcept
 
bool Drop (void)
 Drop allocated connection. More...
 
CS_CONNECTIONGetNativeHandle (void) const
 
bool IsOpen (void) const
 
bool Open (const CDBConnParams &params)
 
bool Close (void)
 
bool Cancel (void)
 
bool IsAlive (void)
 
bool IsOpen_native (void)
 
bool IsDead (void) const
 
void SetDead (bool flag=true)
 

Protected Member Functions

const CTL_ConnectionGetCTLConn (void) const
 
CTL_ConnectionGetCTLConn (void)
 
const CTLibContextGetCTLContext (void) const
 
CTLibContextGetCTLContext (void)
 
CS_RETCODE CheckWhileOpening (CS_RETCODE rc)
 

Private Attributes

CTLibContextm_CTL_Context
 
CTL_Connectionm_CTL_Conn
 
CS_CONNECTIONm_Handle
 
bool m_IsAllocated
 
bool m_IsOpen
 
bool m_IsDead
 

Detailed Description

Definition at line 139 of file interfaces.hpp.

Constructor & Destructor Documentation

◆ Connection()

ctlib::Connection::Connection ( CTLibContext context,
CTL_Connection ctl_conn 
)

◆ ~Connection()

ctlib::Connection::~Connection ( void  )
noexcept

Definition at line 233 of file context.cpp.

References NCBI_CATCH_ALL_X, and NCBI_CURRENT_FUNCTION.

Member Function Documentation

◆ Cancel()

bool ctlib::Connection::Cancel ( void  )

◆ CheckWhileOpening()

CS_RETCODE ctlib::Connection::CheckWhileOpening ( CS_RETCODE  rc)
inlineprotected

Definition at line 1391 of file interfaces.hpp.

Referenced by Connection(), and Open().

◆ Close()

bool ctlib::Connection::Close ( void  )

◆ Drop()

bool ctlib::Connection::Drop ( void  )

Drop allocated connection.

Definition at line 246 of file context.cpp.

References CTL_Connection::Check(), ct_con_drop(), GetCTLConn(), m_Handle, m_IsAllocated, and m_IsOpen.

Referenced by CTL_Connection::Close().

◆ GetCTLConn() [1/2]

CTL_Connection & ctlib::Connection::GetCTLConn ( void  )
protected

Definition at line 271 of file context.cpp.

References DATABASE_DRIVER_ERROR, and m_CTL_Conn.

◆ GetCTLConn() [2/2]

const CTL_Connection & ctlib::Connection::GetCTLConn ( void  ) const
protected

Definition at line 260 of file context.cpp.

References DATABASE_DRIVER_ERROR, and m_CTL_Conn.

Referenced by Cancel(), Close(), Drop(), IsAlive(), and IsOpen_native().

◆ GetCTLContext() [1/2]

CTLibContext& ctlib::Connection::GetCTLContext ( void  )
inlineprotected

Definition at line 185 of file interfaces.hpp.

References _ASSERT.

◆ GetCTLContext() [2/2]

const CTLibContext& ctlib::Connection::GetCTLContext ( void  ) const
inlineprotected

Definition at line 180 of file interfaces.hpp.

References _ASSERT.

Referenced by Connection().

◆ GetNativeHandle()

CS_CONNECTION* ctlib::Connection::GetNativeHandle ( void  ) const
inline

◆ IsAlive()

bool ctlib::Connection::IsAlive ( void  )

◆ IsDead()

bool ctlib::Connection::IsDead ( void  ) const
inline

Definition at line 165 of file interfaces.hpp.

Referenced by Close().

◆ IsOpen()

bool ctlib::Connection::IsOpen ( void  ) const
inline

Definition at line 153 of file interfaces.hpp.

Referenced by Cancel(), Close(), CTL_Connection::Close(), and Open().

◆ IsOpen_native()

bool ctlib::Connection::IsOpen_native ( void  )

◆ Open()

bool ctlib::Connection::Open ( const CDBConnParams params)

◆ SetDead()

void ctlib::Connection::SetDead ( bool  flag = true)
inline

Definition at line 169 of file interfaces.hpp.

Member Data Documentation

◆ m_CTL_Conn

CTL_Connection* ctlib::Connection::m_CTL_Conn
private

Definition at line 195 of file interfaces.hpp.

Referenced by GetCTLConn().

◆ m_CTL_Context

CTLibContext* ctlib::Connection::m_CTL_Context
private

Definition at line 194 of file interfaces.hpp.

Referenced by Open().

◆ m_Handle

CS_CONNECTION* ctlib::Connection::m_Handle
private

Definition at line 196 of file interfaces.hpp.

Referenced by Connection(), and Drop().

◆ m_IsAllocated

bool ctlib::Connection::m_IsAllocated
private

Definition at line 197 of file interfaces.hpp.

Referenced by Connection(), and Drop().

◆ m_IsDead

bool ctlib::Connection::m_IsDead
private

Definition at line 199 of file interfaces.hpp.

◆ m_IsOpen

bool ctlib::Connection::m_IsOpen
private

Definition at line 198 of file interfaces.hpp.

Referenced by Close(), Drop(), and Open().


The documentation for this class was generated from the following files:
Modified on Sun Mar 03 03:12:16 2024 by modify_doxy.py rev. 669887