![]() |
RDB 2
|
Point cloud transaction scope helper class. More...
#include <transactionScope.hpp>
Public Member Functions | |
TransactionScope (riegl::rdb::Pointcloud &pointcloud, const std::string &title, const std::string &agent, const std::string &comments="", const std::string &settings="") | |
Begin new transaction. More... | |
~TransactionScope () | |
End transaction. More... | |
Transaction::ID | id () const |
Get transaction ID. More... | |
void | commit () |
Commit transaction. More... | |
template<typename Callable > | |
void | commit (Callable &&progress) |
template<typename Callable , typename Receiver > | |
void | commit (Callable &&progress, Receiver &&receiver) |
void | rollback () |
Rollback transaction. More... | |
Public Attributes | |
bool | autoCommit |
true: call commit(), false: call rollback() on deletion More... | |
Point cloud transaction scope helper class.
This class wraps transaction creation, commit and rollback. It automatically starts a new transaction on construction and either commits or reverts the transaction on deletion. Whether commit() or rollback() is called is defined by variable autoCommit, default is false (i.e. rollback).
Definition at line 59 of file transactionScope.hpp.
|
inlineexplicit |
Begin new transaction.
[in] | pointcloud | target point cloud object |
[in] | title | short description, e.g. "Import" |
[in] | agent | software name, e.g. "rdbimport v1.0" |
[in] | comments | e.g. process details for humans |
[in] | settings | e.g. process settings for software |
Definition at line 68 of file transactionScope.hpp.
|
inline |
End transaction.
Definition at line 88 of file transactionScope.hpp.
|
inline |
Commit transaction.
Definition at line 108 of file transactionScope.hpp.
|
inline |
Definition at line 117 of file transactionScope.hpp.
|
inline |
Definition at line 128 of file transactionScope.hpp.
|
inline |
Get transaction ID.
Definition at line 99 of file transactionScope.hpp.
|
inline |
Rollback transaction.
Definition at line 144 of file transactionScope.hpp.
bool riegl::rdb::pointcloud::TransactionScope::autoCommit |
true: call commit(), false: call rollback() on deletion
Definition at line 62 of file transactionScope.hpp.