CMS 3D CMS Logo

Public Member Functions | Private Attributes

ora::SharedSession Class Reference

#include <ConnectionPool.h>

List of all members.

Public Member Functions

void close ()
coral::ISessionProxy & get ()
bool isValid ()
SharedSessionoperator= (const SharedSession &rhs)
 SharedSession (boost::shared_ptr< coral::ISessionProxy > &coralSession)
 SharedSession ()
 SharedSession (const SharedSession &rhs)
 ~SharedSession ()

Private Attributes

boost::shared_ptr
< coral::ISessionProxy > 
m_proxy

Detailed Description

Definition at line 17 of file ConnectionPool.h.


Constructor & Destructor Documentation

ora::SharedSession::SharedSession ( )

Definition at line 6 of file ConnectionPool.cc.

                               :
  m_proxy(){
}
ora::SharedSession::SharedSession ( boost::shared_ptr< coral::ISessionProxy > &  coralSession)

Definition at line 10 of file ConnectionPool.cc.

                                                                                :
  m_proxy(coralSession){
}
ora::SharedSession::SharedSession ( const SharedSession rhs)

Definition at line 14 of file ConnectionPool.cc.

                                                            :
  m_proxy( rhs.m_proxy ){
}
ora::SharedSession::~SharedSession ( )

Definition at line 18 of file ConnectionPool.cc.

                                {
}

Member Function Documentation

void ora::SharedSession::close ( void  )

Definition at line 39 of file ConnectionPool.cc.

                            {
  m_proxy.reset();
}
coral::ISessionProxy & ora::SharedSession::get ( void  )

Definition at line 27 of file ConnectionPool.cc.

References ora::throwException().

                     {
  if(!m_proxy.get()){
    throwException("Coral Database Session is not available.",
                   "SharedSession::proxy");
  }
  return *m_proxy;
}
bool ora::SharedSession::isValid ( void  )

Definition at line 35 of file ConnectionPool.cc.

                              {
  return m_proxy.get();
}
ora::SharedSession & ora::SharedSession::operator= ( const SharedSession rhs)

Definition at line 21 of file ConnectionPool.cc.

References m_proxy.

                                                                          {
  m_proxy = rhs.m_proxy;
  return *this;
}

Member Data Documentation

boost::shared_ptr<coral::ISessionProxy> ora::SharedSession::m_proxy [private]

Definition at line 28 of file ConnectionPool.h.

Referenced by operator=().