libpqxx  7.1.2
pqxx::internal::namedclass Class Reference

Helper base class: object descriptions for error messages and such. More...

#include <util.hxx>

Inheritance diagram for pqxx::internal::namedclass:

Public Member Functions

 namedclass (std::string_view classname)
 namedclass (std::string_view classname, std::string_view name)
 namedclass (std::string_view classname, char const name[])
 namedclass (std::string_view classname, std::string &&name)
std::string const & name () const noexcept
 Object name, or the empty string if no name was given. More...
std::string const & classname () const noexcept
 Class name. More...
std::string description () const
 Combination of class name and object name; or just class name. More...

Detailed Description

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.

Constructor & Destructor Documentation

◆ namedclass() [1/4]

pqxx::internal::namedclass::namedclass ( std::string_view  classname)

◆ namedclass() [2/4]

pqxx::internal::namedclass::namedclass ( std::string_view  classname,
std::string_view  name 

◆ namedclass() [3/4]

pqxx::internal::namedclass::namedclass ( std::string_view  classname,
char const  name[] 

◆ namedclass() [4/4]

pqxx::internal::namedclass::namedclass ( std::string_view  classname,
std::string &&  name 

Member Function Documentation

◆ classname()

std::string const& pqxx::internal::namedclass::classname ( ) const

◆ description()

◆ name()

std::string const& pqxx::internal::namedclass::name ( ) const

The documentation for this class was generated from the following files: