1#ifndef PROTON_ENDPOINT_HPP
2#define PROTON_ENDPOINT_HPP
27#include "./internal/export.hpp"
73template <
class T,
class D>
class iter_base {
77 T operator*()
const {
return obj_; }
78 T* operator->()
const {
return const_cast<T*
>(&obj_); }
79 D operator++(
int) { D x(*
this); ++(*this);
return x; }
80 bool operator==(
const iter_base<T, D>& x)
const {
return obj_ == x.obj_; }
81 bool operator!=(
const iter_base<T, D>& x)
const {
return obj_ != x.obj_; }
84 explicit iter_base(T p = 0) : obj_(p) {}
88template<
class I>
class iter_range {
92 explicit iter_range(I begin = I(), I end = I()) : begin_(begin), end_(end) {}
93 I begin()
const {
return begin_; }
94 I end()
const {
return end_; }
95 bool empty()
const {
return begin_ == end_; }
The base class for session, connection, and link.
Definition endpoint.hpp:36
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:39
Describes an endpoint error state.
The main Proton namespace.
Definition annotation_key.hpp:33
The base Proton error.
Definition error.hpp:40