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>."
32 transaction_base &t, std::string_view cname, std::string_view oname) :
33 m_trans{&t}, m_classname{cname}, m_name{oname}
37 transaction_base &t, std::string_view cname, std::string &&oname) :
38 m_trans{&t}, m_classname{cname}, m_name{std::move(oname)}
50 [[nodiscard]]
constexpr std::string_view
classname() const noexcept
56 [[nodiscard]] std::string_view
name() const & noexcept {
return m_name; }
65 m_registered{other.m_registered},
66 m_classname{other.m_classname},
73 move_name_and_registration(other);
83 m_classname = other.m_classname;
84 move_name_and_registration(other);
91 void unregister_me() noexcept;
92 void reg_pending_error(std::
string const &) noexcept;
93 bool registered() const noexcept {
return m_registered; }
98 bool m_registered =
false;
99 std::string_view m_classname;
105 bool const reg{other.m_registered};
110 m_name = std::move(other.m_name);
std::string description() const
Definition transaction_focus.hxx:58
bool registered() const noexcept
Definition transaction_focus.hxx:93
transaction_focus()=delete
transaction_focus(transaction_base &t, std::string_view cname)
Definition transaction_focus.hxx:41
void unregister_me() noexcept
Definition transaction_base.cxx:523
std::string_view name() const &noexcept
Name for this object, if the caller passed one; empty string otherwise.
Definition transaction_focus.hxx:56
constexpr std::string_view classname() const noexcept
Class name, for human consumption.
Definition transaction_focus.hxx:50
transaction_focus(transaction_base &t, std::string_view cname, std::string &&oname)
Definition transaction_focus.hxx:36
transaction_focus(transaction_focus const &)=delete
transaction_focus(transaction_focus &&other)
Definition transaction_focus.hxx:63
void register_me()
Definition transaction_base.cxx:515
transaction_focus & operator=(transaction_focus &&other)
Definition transaction_focus.hxx:76
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:95
transaction_focus & operator=(transaction_focus const &)=delete
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:53
The home of all libpqxx classes, functions, templates, etc.
Definition array.cxx:27