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.
Referenced by description().
std::string pqxx::internal::namedclass::description | ( | ) | const |
Combination of class name and object name; or just class name.
References classname(), and name().
Referenced by pqxx::internal::CheckUniqueRegistration(), and pqxx::internal::CheckUniqueUnregistration().
|
noexcept |
Object name, or the empty string if no name was given.
Referenced by description().