libpqxx
The C++ client library for PostgreSQL
connection-notification_receiver.hxx
Go to the documentation of this file.
1 #ifndef PQXX_INTERNAL_GATES_CONNECTION_NOTIFICATION_RECEIVER_HXX
2 #define PQXX_INTERNAL_GATES_CONNECTION_NOTIFICATION_RECEIVER_HXX
3 
5 
6 #include "pqxx/connection.hxx"
7 
8 
9 namespace pqxx
10 {
11 class notification_receiver;
12 } // namespace pqxx
13 
14 
15 namespace pqxx::internal::gate
16 {
18  : callgate<connection>
19 {
21 
22  explicit constexpr connection_notification_receiver(reference x) noexcept :
23  super(x)
24  {}
25 
26  void add_receiver(notification_receiver *receiver, sl loc)
27  {
28  home().add_receiver(receiver, loc);
29  }
30  void remove_receiver(notification_receiver *receiver, sl loc) noexcept
31  {
32  home().remove_receiver(receiver, loc);
33  }
34 };
35 } // namespace pqxx::internal::gate
36 #endif
Connection to a database.
Definition: connection.hxx:273
Base class for call gates.
Definition: callgate.hxx:55
Definition: connection-notification_receiver.hxx:19
Definition: notification.hxx:60
#define PQXX_PRIVATE
Definition: header-pre.hxx:207
Definition: connection.hxx:94
The home of all libpqxx classes, functions, templates, etc.
Definition: array.cxx:26
std::source_location sl
Convenience alias for std::source_location. It's just too long.
Definition: types.hxx:38