libpqxx
The C++ client library for PostgreSQL
Toggle main menu visibility
Loading...
Searching...
No Matches
callgate.hxx
Go to the documentation of this file.
1
#ifndef PQXX_H_CALLGATE
2
#define PQXX_H_CALLGATE
3
4
/*
5
Here's what a typical gate class definition looks like:
6
7
```cxx
8
#include <pqxx/internal/callgate.hxx>
9
10
namespace pqxx::internal::gate
11
{
12
class PQXX_PRIVATE @gateclass@ : callgate<@host@>
13
{
14
friend class @client@;
15
16
@gateclass@(reference x) : super(x) {}
17
18
// Methods here. Use home() to access the host-class object.
19
};
20
} // namespace pqxx::internal::gate
21
```
22
*/
23
24
namespace
pqxx::internal
25
{
27
54
template
<
typename
HOME>
class
PQXX_PRIVATE
callgate
55
{
56
protected
:
58
using
super
=
callgate<HOME>
;
60
using
reference
= HOME &;
61
62
callgate
(
reference
x) : m_home(x) {}
63
65
reference
home
() const noexcept {
return
m_home; }
66
67
private
:
68
reference m_home;
69
};
70
}
// namespace pqxx::internal
71
72
#endif
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::callgate::callgate
callgate(reference x)
Definition
callgate.hxx:62
pqxx::internal::callgate::super
callgate< HOME > super
This class, to keep constructors easy.
Definition
callgate.hxx:58
PQXX_PRIVATE
#define PQXX_PRIVATE
Definition
header-pre.hxx:158
pqxx::internal
Internal items for libpqxx' own use. Do not use these yourself.
Definition
encodings.cxx:33
include
pqxx
internal
callgate.hxx
Generated by
1.17.0