E-MailRelay
Public Member Functions | Friends | List of all members
GNet::EventStateUnbound Class Reference

The EventStateUnbound class is used as a device to force factory methods to plumb-in an ExceptionSource pointer into the newly-created object as soon as its address is available, before the EventState propagates into base classes and sub-objects. More...

#include <geventstate.h>

Public Member Functions

 EventStateUnbound (EventState) noexcept
 Constructor. See also EventState::unbound(). More...
 

Friends

EventState esbindfriend (EventStateUnbound, ExceptionSource *) noexcept
 

Detailed Description

The EventStateUnbound class is used as a device to force factory methods to plumb-in an ExceptionSource pointer into the newly-created object as soon as its address is available, before the EventState propagates into base classes and sub-objects.

The free function GNet::esbind() can be used to bind() the new EventState in a way that takes account of the type of the constructed object (see GNet::EventLogging).

Eg:

Foo::Foo( EventStateUnbound ebu , ... )
FooBase(esbind(ebu,this),...) ,
m_sub_object(esbind(ebu,this),...)
{
}
EventStateUnbound(EventState) noexcept
Constructor. See also EventState::unbound().
Definition: geventstate.cpp:93

Definition at line 230 of file geventstate.h.

Constructor & Destructor Documentation

◆ EventStateUnbound()

GNet::EventStateUnbound::EventStateUnbound ( EventState  es)
explicitnoexcept

Constructor. See also EventState::unbound().

Definition at line 93 of file geventstate.cpp.

Friends And Related Function Documentation

◆ esbindfriend

EventState esbindfriend ( EventStateUnbound  esu,
ExceptionSource esrc 
)
friend

Definition at line 294 of file geventstate.h.


The documentation for this class was generated from the following files: