The Battle for Wesnoth  1.17.6+dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
game_events::pending_event_handler Class Reference

Represents a handler that is about to be added to the events manager but is still waiting for some data. More...

#include <manager_impl.hpp>

Public Member Functions

 pending_event_handler (event_handlers &list, handler_ptr handler)
 
bool valid () const
 Check if this handler is valid. More...
 
event_handleroperator-> ()
 Access the event handler. More...
 
event_handleroperator* ()
 
 pending_event_handler (pending_event_handler &&)=default
 
 ~pending_event_handler ()
 

Private Member Functions

 pending_event_handler (const pending_event_handler &)=delete
 
pending_event_handleroperator= (const pending_event_handler &)=delete
 
pending_event_handleroperator= (pending_event_handler &&)=delete
 

Private Attributes

event_handlerslist_
 
handler_ptr handler_
 

Detailed Description

Represents a handler that is about to be added to the events manager but is still waiting for some data.

The handler will automatically be added when this class is destroyed, unless it has become invalid somehow.

Definition at line 33 of file manager_impl.hpp.

Constructor & Destructor Documentation

◆ pending_event_handler() [1/3]

game_events::pending_event_handler::pending_event_handler ( const pending_event_handler )
privatedelete

Referenced by operator*().

◆ pending_event_handler() [2/3]

game_events::pending_event_handler::pending_event_handler ( event_handlers list,
handler_ptr  handler 
)
inline

Definition at line 42 of file manager_impl.hpp.

◆ pending_event_handler() [3/3]

game_events::pending_event_handler::pending_event_handler ( pending_event_handler &&  )
default

◆ ~pending_event_handler()

game_events::pending_event_handler::~pending_event_handler ( )

Definition at line 159 of file manager_impl.cpp.

References gui2::event::handler_.

Referenced by operator*().

Member Function Documentation

◆ operator*()

event_handler& game_events::pending_event_handler::operator* ( )
inline

Definition at line 50 of file manager_impl.hpp.

References handler_, pending_event_handler(), and ~pending_event_handler().

◆ operator->()

event_handler* game_events::pending_event_handler::operator-> ( )
inline

Access the event handler.

Definition at line 49 of file manager_impl.hpp.

◆ operator=() [1/2]

pending_event_handler& game_events::pending_event_handler::operator= ( const pending_event_handler )
privatedelete

◆ operator=() [2/2]

pending_event_handler& game_events::pending_event_handler::operator= ( pending_event_handler &&  )
privatedelete

◆ valid()

bool game_events::pending_event_handler::valid ( ) const
inline

Check if this handler is valid.

Definition at line 47 of file manager_impl.hpp.

Member Data Documentation

◆ handler_

handler_ptr game_events::pending_event_handler::handler_
private

Definition at line 36 of file manager_impl.hpp.

Referenced by operator*().

◆ list_

event_handlers& game_events::pending_event_handler::list_
private

Definition at line 35 of file manager_impl.hpp.


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