21#ifndef G_NET_EVENT_STATE_H
22#define G_NET_EVENT_STATE_H
35 class EventStateUnbound ;
140 friend class GNet::EventLoopImp ;
202 void logging(
std::nullptr_t ) const = delete ;
207 EventLogging * m_logging {
nullptr} ;
289 return m_eh != nullptr ;
297 return esu.bind( esrc ) ;
300 template <
typename T>
301 EventState esbind( EventStateUnbound esu , T * p )
303 return esbindfriend( esu , p ) ;
An interface for GNet classes that define a logging context string.
The EventStateUnbound class is used as a device to force factory methods to plumb-in an ExceptionSour...
EventStateUnbound(EventState) noexcept
Constructor. See also EventState::unbound().
A lightweight object containing an ExceptionHandler pointer, optional ExceptionSource pointer and opt...
EventState(Private, ExceptionHandler *eh, ExceptionSource *source) noexcept
Constructor used by event loops etc.
void doOnException(std::exception &e, bool done)
Calls the exception handler's onException() method.
static EventState create()
A factory function for an exception handler that rethrows.
ExceptionHandler * eh() const noexcept
Returns the exception handler pointer.
void disarm() noexcept
Resets the exception handler.
EventStateUnbound unbound() const noexcept
Returns a copy of this object as type EventStateUnbound with a null ExceptionSource.
EventLogging * logging() const noexcept
Returns the event logging pointer.
bool hasExceptionHandler() const noexcept
Returns true if eh() is not null.
ExceptionSource * esrc() const noexcept
Returns the exception source pointer.
An abstract interface for handling exceptions thrown out of event-loop callbacks (socket/future event...
A mixin base class that identifies the source of an exception when delivered to GNet::ExceptionHandle...
A singleton which maintains a list of all Timer objects, and interfaces to the event loop on their be...
Overload discriminator for GNet::EventState.