neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::slot< Args > Class Template Reference

#include <i_event.hpp>

Inheritance diagram for neolib::slot< Args >:
neolib::reference_counted< lifetime< i_slot< Args... > > > neolib::lifetime< i_slot< Args... > > neolib::i_slot< Args... > neolib::i_slot_base neolib::i_reference_counted neolib::i_lifetime

Public Member Functions

 slot (i_event< Args... > const &aEvent, std::function< void(Args...)> const &aCallable)
 
 ~slot ()
 
void remove () final
 
i_event< Args... > constevent () const final
 
void call (Args... aArgs) const final
 
std::thread::id call_thread () const final
 
bool call_in_emitter_thread () const final
 
void set_call_in_emitter_thread (bool aCallInEmitterThread) final
 
bool stateless () const final
 
void set_stateless (bool aStateless) final
 
- Public Member Functions inherited from neolib::reference_counted< lifetime< i_slot< Args... > > >
 reference_counted () noexcept
 
 reference_counted (const reference_counted &aOther) noexcept
 
 ~reference_counted ()
 
reference_countedoperator= (const reference_counted &)
 
void add_ref () const noexcept override
 
void release () const override
 
int32_t use_count () const noexcept override
 
const base_typerelease_and_take_ownership () const override
 
base_typerelease_and_take_ownership () override
 
void pin () const noexcept override
 
void unpin () const override
 
i_ref_control_blockcontrol_block () override
 
- Public Member Functions inherited from neolib::lifetime< i_slot< Args... > >
 lifetime (lifetime_state aState=lifetime_state::Alive)
 
virtual ~lifetime ()
 
lifetime_state object_state () const final
 
std::shared_ptr< std::atomic< lifetime_state > > object_state_ptr () const final
 
bool is_creating () const final
 
bool is_alive () const final
 
bool is_destroying () const final
 
bool is_destroyed () const final
 
void set_alive () override
 
void set_destroying () override
 
void set_destroyed () override
 
- Public Member Functions inherited from neolib::i_reference_counted
virtual ~i_reference_counted ()=default
 
- Public Member Functions inherited from neolib::i_lifetime
virtual ~i_lifetime ()=default
 

Additional Inherited Members

- Public Types inherited from neolib::lifetime< i_slot< Args... > >
typedef neolib::destroyed_flag destroyed_flag
 
- Public Types inherited from neolib::i_slot< Args... >
typedef i_slot abstract_type
 
- Public Types inherited from neolib::i_slot_base
typedef i_slot_base abstract_type
 

Detailed Description

template<typename... Args>
class neolib::slot< Args >

Definition at line 191 of file i_event.hpp.

Constructor & Destructor Documentation

◆ slot()

template<typename... Args>
neolib::slot< Args >::slot ( i_event< Args... > const aEvent,
std::function< void(Args...)> const aCallable 
)
inline

Definition at line 195 of file i_event.hpp.

◆ ~slot()

template<typename... Args>
neolib::slot< Args >::~slot ( )
inline

Definition at line 203 of file i_event.hpp.

Member Function Documentation

◆ call()

template<typename... Args>
void neolib::slot< Args >::call ( Args...  aArgs) const
inlinefinalvirtual

Implements neolib::i_slot< Args... >.

Definition at line 217 of file i_event.hpp.

◆ call_in_emitter_thread()

template<typename... Args>
bool neolib::slot< Args >::call_in_emitter_thread ( ) const
inlinefinalvirtual

Implements neolib::i_slot< Args... >.

Definition at line 227 of file i_event.hpp.

◆ call_thread()

template<typename... Args>
std::thread::id neolib::slot< Args >::call_thread ( ) const
inlinefinalvirtual

Implements neolib::i_slot< Args... >.

Definition at line 221 of file i_event.hpp.

◆ event()

template<typename... Args>
i_event< Args... > const & neolib::slot< Args >::event ( ) const
inlinefinalvirtual

Implements neolib::i_slot< Args... >.

Definition at line 213 of file i_event.hpp.

◆ remove()

template<typename... Args>
void neolib::slot< Args >::remove ( )
inlinefinalvirtual

Implements neolib::i_slot_base.

Definition at line 208 of file i_event.hpp.

◆ set_call_in_emitter_thread()

template<typename... Args>
void neolib::slot< Args >::set_call_in_emitter_thread ( bool  aCallInEmitterThread)
inlinefinalvirtual

Implements neolib::i_slot< Args... >.

Definition at line 231 of file i_event.hpp.

◆ set_stateless()

template<typename... Args>
void neolib::slot< Args >::set_stateless ( bool  aStateless)
inlinefinalvirtual

Implements neolib::i_slot< Args... >.

Definition at line 242 of file i_event.hpp.

◆ stateless()

template<typename... Args>
bool neolib::slot< Args >::stateless ( ) const
inlinefinalvirtual

Implements neolib::i_slot< Args... >.

Definition at line 238 of file i_event.hpp.


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