OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine::msgbus::actor< N, Subscriber > Class Template Reference

Base class for message bus actors with fixed number of message handlers. More...

#include <eagine/message_bus/actor.hpp>

Public Member Functions

 actor (actor &&)=delete
 Not move constructible.
 
 actor (const actor &)=delete
 Not copy constructible.
 
auto operator= (actor &&)=delete
 Not moved assignable.
 
auto operator= (const actor &)=delete
 Not copy assignable.
 
auto bus () noexcept -> endpoint &
 Returns a reference to the associated endpoint.
 
auto add_connection (std::unique_ptr< connection > conn) -> bool final
 Adds a connection to the associated endpoint.
 
void process_one ()
 Processes a single enqueued message for which there is a handler. More...
 
void process_all ()
 Processes all enqueued messages for which there are handlers. More...
 
- Public Member Functions inherited from eagine::interface< connection_user >
constexpr interface (const interface &)=delete
 Not copyable.
 
auto operator= (interface &&)=delete
 Not move assignable.
 
auto operator= (const interface &)=delete
 Not copy assignable.
 

Protected Member Functions

template<typename Class , typename... MsgMaps, typename = std::enable_if_t<sizeof...(MsgMaps) == N>>
 actor (main_ctx_object obj, Class *instance, MsgMaps... msg_maps)
 Constructor usable from derived classes.
 
template<typename Derived , typename Class , typename... MsgMaps, typename = std::enable_if_t< (sizeof...(MsgMaps) == N) && std::is_base_of_v<actor, Derived>>>
 actor (Derived &&temp, Class *instance, MsgMaps... msg_maps) noexcept
 Constructor usable from derived classes.
 
- Protected Member Functions inherited from eagine::interface< connection_user >
constexpr interface () noexcept=default
 Default constructible by derived.
 
constexpr interface (interface &&) noexcept=default
 Move constructible by derived.
 

Detailed Description

template<std::size_t N, template< std::size_t > class Subscriber = static_subscriber>
class eagine::msgbus::actor< N, Subscriber >

Base class for message bus actors with fixed number of message handlers.

See also
static_subscriber
subscriber
endpoint

Member Function Documentation

◆ process_all()

template<std::size_t N, template< std::size_t > class Subscriber = static_subscriber>
void eagine::msgbus::actor< N, Subscriber >::process_all ( )
inline

Processes all enqueued messages for which there are handlers.

See also
process_one

◆ process_one()

template<std::size_t N, template< std::size_t > class Subscriber = static_subscriber>
void eagine::msgbus::actor< N, Subscriber >::process_one ( )
inline

Processes a single enqueued message for which there is a handler.

See also
process_all

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

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).