Leosac  0.8.0
Open Source Access Control
Leosac::db::MultiplexedSession Class Reference

Acts like an odb::session, with the exception that it will save the current active session (if any) and restore it when this MultiplexedSession ends. More...

#include <MultiplexedSession.hpp>

+ Collaboration diagram for Leosac::db::MultiplexedSession:

Public Member Functions

 MultiplexedSession ()
 
 ~MultiplexedSession ()
 

Private Attributes

std::unique_ptr< odb::session > session_
 
odb::session * previous_
 

Detailed Description

Acts like an odb::session, with the exception that it will save the current active session (if any) and restore it when this MultiplexedSession ends.

This object is useful to create new session without having to worry about the currently active one.

See also
MultiplexedTransaction.

Definition at line 39 of file MultiplexedSession.hpp.

Constructor & Destructor Documentation

◆ MultiplexedSession()

MultiplexedSession::MultiplexedSession ( )

Definition at line 26 of file MultiplexedSession.cpp.

◆ ~MultiplexedSession()

MultiplexedSession::~MultiplexedSession ( )

Definition at line 36 of file MultiplexedSession.cpp.

Member Data Documentation

◆ previous_

odb::session* Leosac::db::MultiplexedSession::previous_
private

Definition at line 47 of file MultiplexedSession.hpp.

◆ session_

std::unique_ptr<odb::session> Leosac::db::MultiplexedSession::session_
private

Definition at line 46 of file MultiplexedSession.hpp.


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