1#ifndef PROTON_ENDPOINT_HPP
2#define PROTON_ENDPOINT_HPP
27#include "./internal/config.hpp"
28#include "./internal/export.hpp"
63#if PN_CPP_HAS_DEFAULTED_FUNCTIONS && PN_CPP_HAS_DEFAULTED_MOVE_INITIALIZERS
78template <
class T,
class D>
class iter_base {
82 T operator*()
const {
return obj_; }
83 T* operator->()
const {
return const_cast<T*
>(&obj_); }
84 D operator++(
int) { D x(*
this); ++(*this);
return x; }
85 bool operator==(
const iter_base<T, D>& x)
const {
return obj_ == x.obj_; }
86 bool operator!=(
const iter_base<T, D>& x)
const {
return obj_ != x.obj_; }
89 explicit iter_base(T p = 0) : obj_(p) {}
93template<
class I>
class iter_range {
97 explicit iter_range(I begin = I(), I end = I()) : begin_(begin), end_(end) {}
98 I begin()
const {
return begin_; }
99 I end()
const {
return end_; }
100 bool empty()
const {
return begin_ == end_; }
The base class for session, connection, and link.
Definition: endpoint.hpp:37
virtual bool closed() const =0
True if the local and remote ends are closed.
virtual bool active() const =0
True if the local end is active.
virtual void close(const error_condition &)=0
Close the endpoint with an error condition.
virtual bool uninitialized() const =0
True if the local end is uninitialized.
virtual void close()=0
Close the endpoint.
Describes an endpoint error state.
Definition: error_condition.hpp:40
Describes an endpoint error state.
The main Proton namespace.
Definition: annotation_key.hpp:33
The base Proton error.
Definition: error.hpp:41