|
SObjectizer
5.7
|
Interface of event_queue_hook object. More...
#include <event_queue_hook.hpp>
Public Member Functions | |
| event_queue_hook_t ()=default | |
| virtual | ~event_queue_hook_t ()=default |
| virtual event_queue_t * | on_bind (agent_t *agent, event_queue_t *original_queue) noexcept=0 |
| A reaction to binding of an agent to some event_queue. More... | |
| virtual void | on_unbind (agent_t *agent, event_queue_t *queue) noexcept=0 |
| A reaction to unbinding of an agent from some event_queue. More... | |
Static Public Member Functions | |
| static void | default_deleter (event_queue_hook_t *what) noexcept |
| An implementation of deleter that use operator delete for destroying object of type event_queue_hook. More... | |
| static void | noop_deleter (event_queue_hook_t *) noexcept |
| An implementation of no-op deleter. More... | |
Private Member Functions | |
| event_queue_hook_t (const event_queue_hook_t &)=delete | |
| event_queue_hook_t (event_queue_hook_t &&)=delete | |
| event_queue_hook_t & | operator= (const event_queue_hook_t &)=delete |
| event_queue_hook_t & | operator= (event_queue_hook_t &&)=delete |
Interface of event_queue_hook object.
Since v.5.5.24 there is a new mechanism for customization of SObjectizer: hook for event_queue. Such hooks allows to replace an original event_queue provided by a dispatcher to some custom version of event_queue. That custom version can do some additional stuff, for example, collect some stats about demands.
This class describes an interface of event_queue_hook. The interface contains the following methods:
|
privatedelete |
|
privatedelete |
|
default |
|
virtualdefault |
|
staticnoexcept |
An implementation of deleter that use operator delete for destroying object of type event_queue_hook.
Pointer to this method is intended to be used with event_queue_hook_unique_ptr_t. For example:
|
staticnoexcept |
An implementation of no-op deleter.
This method do nothing. It is intended to be used with objects those not to be deleted by operator delete. For example:
|
pure virtualnoexcept |
A reaction to binding of an agent to some event_queue.
This method can return original_queue or a pointer to a different queue. The agent must use the value returned.
| agent | An agent that is being bound to some event_queue. |
| original_queue | An event_queue created for that agent by a dispatcher. |
Implemented in so_5::experimental::testing::v1::impl::special_event_queue_hook_t, and so_5::anonymous_namespace{environment.cpp}::default_event_queue_hook_t.
|
pure virtualnoexcept |
A reaction to unbinding of an agent from some event_queue.
This method must be called by an agent even if the previous call to on_bind() returned pointer to the original queue.
| agent | An agent that is being bound to some event_queue. |
| queue | The pointer returned by previous call to on_bind. |
Implemented in so_5::experimental::testing::v1::impl::special_event_queue_hook_t, and so_5::anonymous_namespace{environment.cpp}::default_event_queue_hook_t.
|
privatedelete |
|
privatedelete |
1.8.14