9 #ifndef PQXX_H_TRANSACTION_FOCUS 10 #define PQXX_H_TRANSACTION_FOCUS 12 #if !defined(PQXX_HEADER_PRE) 13 # error "Include libpqxx headers as <pqxx/header>, not <pqxx/header.hxx>." 16 #include "pqxx/util.hxx" 33 m_trans{t}, m_classname{cname}, m_name{oname}
38 m_trans{t}, m_classname{cname}, m_name{std::move(oname)}
42 m_trans{t}, m_classname{cname}
45 transaction_focus() =
delete;
46 transaction_focus(transaction_focus
const &) =
delete;
47 transaction_focus &operator=(transaction_focus
const &) =
delete;
50 [[nodiscard]] constexpr std::string_view
classname() const noexcept
56 [[nodiscard]] std::string_view
name() const &noexcept {
return m_name; }
77 void unregister_me() noexcept;
78 void reg_pending_error(
std::
string const &) noexcept;
79 bool registered() const noexcept {
return m_registered; }
84 bool m_registered =
false;
85 std::string_view m_classname;
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:51
transaction_focus(transaction_base &t, std::string_view cname, std::string_view oname)
Definition: transaction_focus.hxx:31
transaction_base & m_trans
Definition: transaction_focus.hxx:81
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:26
transaction_focus(transaction_base &t, std::string_view cname)
Definition: transaction_focus.hxx:41
Interface definition (and common code) for "transaction" classes.
Definition: transaction_base.hxx:76
std::string_view name() const &noexcept
Name for this object, if the caller passed one; empty string otherwise.
Definition: transaction_focus.hxx:56
Base class for things that monopolise a transaction's attention.
Definition: transaction_focus.hxx:28
constexpr std::string_view classname() const noexcept
Class name, for human consumption.
Definition: transaction_focus.hxx:50
std::string description() const
Definition: transaction_focus.hxx:58
transaction_focus(transaction_base &t, std::string_view cname, std::string &&oname)
Definition: transaction_focus.hxx:36