9#ifndef PQXX_H_TRANSACTION_FOCUS
10#define PQXX_H_TRANSACTION_FOCUS
12#include "pqxx/util.hxx"
29 m_trans{t}, m_classname{cname}, m_name{oname}
34 m_trans{t}, m_classname{cname}, m_name{std::move(oname)}
38 m_trans{t}, m_classname{cname}
46 [[nodiscard]] std::string_view
classname() const noexcept
52 [[nodiscard]] std::string_view
name() const &noexcept {
return m_name; }
73 void unregister_me() noexcept;
74 void reg_pending_error(std::
string const &) noexcept;
75 bool registered() const noexcept {
return m_registered; }
80 bool m_registered =
false;
81 std::string_view m_classname;
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:23
std::string describe_object(std::string_view class_name, std::string_view name)
Describe an object for humans, based on class name and optional name.
Definition: util.cxx:72
Interface definition (and common code) for "transaction" classes.
Definition: transaction_base.hxx:73
Base class for things that monopolise a transaction's attention.
Definition: transaction_focus.hxx:25
std::string description() const
Definition: transaction_focus.hxx:54
transaction_base & m_trans
Definition: transaction_focus.hxx:77
transaction_focus()=delete
std::string_view classname() const noexcept
Class name, for human consumption.
Definition: transaction_focus.hxx:46
transaction_focus(transaction_base &t, std::string_view cname)
Definition: transaction_focus.hxx:37
std::string_view name() const &noexcept
Name for this object, if the caller passed one; empty string otherwise.
Definition: transaction_focus.hxx:52
transaction_focus(transaction_base &t, std::string_view cname, std::string &&oname)
Definition: transaction_focus.hxx:32
transaction_focus(transaction_focus const &)=delete
transaction_focus & operator=(transaction_focus &&)=delete
Can't move a transaction_focus.
transaction_focus(transaction_base &t, std::string_view cname, std::string_view oname)
Definition: transaction_focus.hxx:27
transaction_focus & operator=(transaction_focus const &)=delete
transaction_focus(transaction_focus &&)=delete
Can't move a transaction_focus.