connection-reactivation_avoidance_exemption.hxx 679 B

123456789101112131415161718192021222324
  1. #include <pqxx/internal/callgate.hxx>
  2. namespace pqxx
  3. {
  4. namespace internal
  5. {
  6. class reactivation_avoidance_exemption;
  7. namespace gate
  8. {
  9. class PQXX_PRIVATE connection_reactivation_avoidance_exemption :
  10. callgate<connection_base>
  11. {
  12. friend class pqxx::internal::reactivation_avoidance_exemption;
  13. connection_reactivation_avoidance_exemption(reference x) : super(x) {}
  14. int get_counter() const { return home().m_reactivation_avoidance.get(); }
  15. void add_counter(int x) const { home().m_reactivation_avoidance.add(x); }
  16. void clear_counter() { home().m_reactivation_avoidance.clear(); }
  17. };
  18. } // namespace pqxx::internal::gate
  19. } // namespace pqxx::internal
  20. } // namespace pqxx