CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ora::SharedSession Class Reference

#include <ConnectionPool.h>

Public Member Functions

void close ()
 
coral::ISessionProxy & get ()
 
bool isValid ()
 
SharedSessionoperator= (const SharedSession &rhs)
 
boost::shared_ptr
< coral::ISessionProxy > 
share ()
 
 SharedSession ()
 
 SharedSession (boost::shared_ptr< coral::ISessionProxy > &coralSession)
 
 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.

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

Definition at line 10 of file ConnectionPool.cc.

10  :
11  m_proxy(coralSession){
12 }
boost::shared_ptr< coral::ISessionProxy > m_proxy
ora::SharedSession::SharedSession ( const SharedSession rhs)

Definition at line 14 of file ConnectionPool.cc.

14  :
15  m_proxy( rhs.m_proxy ){
16 }
boost::shared_ptr< coral::ISessionProxy > m_proxy
ora::SharedSession::~SharedSession ( )

Definition at line 18 of file ConnectionPool.cc.

18  {
19 }

Member Function Documentation

void ora::SharedSession::close ( void  )
coral::ISessionProxy & ora::SharedSession::get ( )

Definition at line 27 of file ConnectionPool.cc.

References ora::throwException().

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), rrapi.RRApi::columns(), rrapi.RRApi::count(), rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), rrapi.RRApi::report(), rrapi.RRApi::reports(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), and rrapi.RRApi::workspaces().

27  {
28  if(!m_proxy.get()){
29  throwException("Coral Database Session is not available.",
30  "SharedSession::proxy");
31  }
32  return *m_proxy;
33 }
boost::shared_ptr< coral::ISessionProxy > m_proxy
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
Definition: Exception.cc:10
bool ora::SharedSession::isValid ( void  )

Definition at line 40 of file ConnectionPool.cc.

Referenced by core.AutoHandle.AutoHandle::ReallyLoad().

40  {
41  return m_proxy.get();
42 }
boost::shared_ptr< coral::ISessionProxy > m_proxy
ora::SharedSession & ora::SharedSession::operator= ( const SharedSession rhs)

Definition at line 21 of file ConnectionPool.cc.

References m_proxy.

21  {
22  m_proxy = rhs.m_proxy;
23  return *this;
24 }
boost::shared_ptr< coral::ISessionProxy > m_proxy
boost::shared_ptr< coral::ISessionProxy > ora::SharedSession::share ( )

Definition at line 36 of file ConnectionPool.cc.

36  {
37  return m_proxy;
38 }
boost::shared_ptr< coral::ISessionProxy > m_proxy

Member Data Documentation

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

Definition at line 29 of file ConnectionPool.h.

Referenced by operator=().