Common ODB Runtime Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
odb::transaction Class Reference

Classes

struct  callback_data
 

Public Types

typedef odb::database database_type
 
typedef odb::connection connection_type
 
typedef odb::tracer tracer_type
 
typedef void(* callback_type )(unsigned short event, void *key, unsigned long long data)
 

Public Member Functions

 transaction (transaction_impl *, bool make_current=true)
 
 transaction ()
 
 ~transaction ()
 
void reset (transaction_impl *, bool make_current=true)
 
void commit ()
 
void rollback ()
 
database_typedatabase ()
 
connection_typeconnection ()
 
bool finalized () const
 
void tracer (tracer_type &)
 
void tracer (tracer_type *)
 
tracer_typetracer () const
 
void callback_register (callback_type, void *key, unsigned short event=event_all, unsigned long long data=0, transaction **state=0)
 
void callback_unregister (void *key)
 
void callback_update (void *key, unsigned short event, unsigned long long data=0, transaction **state=0)
 
transaction_implimplementation ()
 

Static Public Member Functions

static bool has_current ()
 
static transactioncurrent ()
 
static void current (transaction &)
 
static void reset_current ()
 

Static Public Attributes

static const unsigned short event_commit = 0x01
 
static const unsigned short event_rollback = 0x02
 
static const unsigned short event_all = event_commit | event_rollback
 

Protected Member Functions

std::size_t callback_find (void *key)
 
void callback_call (unsigned short event)
 

Protected Attributes

bool finalized_
 
details::unique_ptr
< transaction_impl
impl_
 
callback_data stack_callbacks_ [stack_callback_count]
 
std::vector< callback_datadyn_callbacks_
 
std::size_t free_callback_
 
std::size_t callback_count_
 

Static Protected Attributes

static const std::size_t stack_callback_count = 20
 
static const std::size_t max_callback_count = ~(std::size_t (0))
 

Friends

struct rollback_guard
 

Member Typedef Documentation

typedef void(* odb::transaction::callback_type)(unsigned short event, void *key, unsigned long long data)

Constructor & Destructor Documentation

odb::transaction::transaction ( transaction_impl ,
bool  make_current = true 
)
explicit
odb::transaction::transaction ( )
odb::transaction::~transaction ( )

Member Function Documentation

void odb::transaction::reset ( transaction_impl ,
bool  make_current = true 
)
void odb::transaction::commit ( )
void odb::transaction::rollback ( )
database_type& odb::transaction::database ( )
connection_type& odb::transaction::connection ( )
bool odb::transaction::finalized ( ) const
inline
static bool odb::transaction::has_current ( )
static
static transaction& odb::transaction::current ( )
static
static void odb::transaction::current ( transaction )
static
static void odb::transaction::reset_current ( )
static
void odb::transaction::tracer ( tracer_type )
void odb::transaction::tracer ( tracer_type )
tracer_type* odb::transaction::tracer ( ) const
void odb::transaction::callback_register ( callback_type  ,
void *  key,
unsigned short  event = event_all,
unsigned long long  data = 0,
transaction **  state = 0 
)
void odb::transaction::callback_unregister ( void *  key)
void odb::transaction::callback_update ( void *  key,
unsigned short  event,
unsigned long long  data = 0,
transaction **  state = 0 
)
transaction_impl& odb::transaction::implementation ( )
std::size_t odb::transaction::callback_find ( void *  key)
protected
void odb::transaction::callback_call ( unsigned short  event)
protected

Friends And Related Function Documentation

friend struct rollback_guard
friend

Member Data Documentation

const unsigned short odb::transaction::event_commit = 0x01
static
const unsigned short odb::transaction::event_rollback = 0x02
static
const unsigned short odb::transaction::event_all = event_commit | event_rollback
static
bool odb::transaction::finalized_
protected
details::unique_ptr<transaction_impl> odb::transaction::impl_
protected
const std::size_t odb::transaction::stack_callback_count = 20
staticprotected
const std::size_t odb::transaction::max_callback_count = ~(std::size_t (0))
staticprotected
callback_data odb::transaction::stack_callbacks_[stack_callback_count]
protected
std::vector<callback_data> odb::transaction::dyn_callbacks_
protected
std::size_t odb::transaction::free_callback_
protected
std::size_t odb::transaction::callback_count_
protected

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