Loading...
Searching...
No Matches
callgate.hxx
#ifndef PQXX_H_CALLGATE
#define PQXX_H_CALLGATE
/*
Here's what a typical gate class definition looks like:
```cxx
#include <pqxx/internal/callgate.hxx>
namespace pqxx::internal::gate
{
class PQXX_PRIVATE @gateclass@ : callgate<@host@>
{
friend class @client@;
@gateclass@(reference x) : super(x) {}
// Methods here. Use home() to access the host-class object.
};
} // namespace pqxx::internal::gate
```
*/
namespace pqxx::internal
{
template<typename HOME> class PQXX_PRIVATE callgate
{
protected:
using super = callgate<HOME>;
using reference = HOME &;
callgate(reference x) : m_home(x) {}
reference home() const noexcept { return m_home; }
private:
reference m_home;
};
} // namespace pqxx::internal
#endif
pqxx::internal::callgate
Base class for call gates.
Definition callgate.hxx:55
pqxx::internal::callgate::home
reference home() const noexcept
The home object. The gate class has full "private" access.
Definition callgate.hxx:65
pqxx::internal::callgate::reference
HOME & reference
A reference to the host class. Helps keep constructors easy.
Definition callgate.hxx:60
pqxx::internal
Internal items for libpqxx' own use. Do not use these yourself.
Definition encodings.cxx:33