libpqxx
|
Helper base class: object descriptions for error messages and such. More...
#include <util.hxx>
Public Member Functions | |
namedclass (const std::string &Classname) | |
namedclass (const std::string &Classname, const std::string &Name) | |
const std::string & | name () const noexcept |
Object name, or the empty string if no name was given. More... | |
const std::string & | classname () const noexcept |
Class name. More... | |
std::string | description () const |
Combination of class name and object name; or just class name. More... | |
Helper base class: object descriptions for error messages and such.
Classes derived from namedclass have a class name (such as "transaction"), an optional object name (such as "delete-old-logs"), and a description generated from the two names (such as "transaction delete-old-logs").
The class name is dynamic here, in order to support inheritance hierarchies where the exact class name may not be known statically.
In inheritance hierarchies, make namedclass a virtual base class so that each class in the hierarchy can specify its own class name in its constructors.
|
explicit |
pqxx::internal::namedclass::namedclass | ( | const std::string & | Classname, |
const std::string & | Name | ||
) |
|
noexcept |
Class name.
References pqxx::internal::CheckUniqueRegistration(), and pqxx::internal::CheckUniqueUnregistration().
std::string pqxx::internal::namedclass::description | ( | ) | const |
Combination of class name and object name; or just class name.
Referenced by pqxx::transaction_base::abort(), pqxx::internal::CheckUniqueRegistration(), pqxx::internal::CheckUniqueUnregistration(), pqxx::transaction_base::commit(), pqxx::transaction_base::End(), pqxx::transaction_base::exec(), pqxx::transaction_base::quote_raw(), and pqxx::transaction_base::~transaction_base().
|
noexcept |
Object name, or the empty string if no name was given.
Referenced by pqxx::internal::basic_transaction::basic_transaction(), pqxx::subtransaction::subtransaction(), and pqxx::internal::basic_robusttransaction::~basic_robusttransaction().