The Battle for Wesnoth  1.19.7+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 32 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

◆ pending_event_handler() [2/3]

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

Definition at line 41 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 ( )

Member Function Documentation

◆ operator*()

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

Definition at line 49 of file manager_impl.hpp.

References handler_.

◆ operator->()

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

Access the event handler.

Definition at line 48 of file manager_impl.hpp.

References handler_.

◆ 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 46 of file manager_impl.hpp.

References handler_.

Referenced by ~pending_event_handler().

Member Data Documentation

◆ handler_

handler_ptr game_events::pending_event_handler::handler_
private

Definition at line 35 of file manager_impl.hpp.

Referenced by operator*(), operator->(), valid(), and ~pending_event_handler().

◆ list_

event_handlers& game_events::pending_event_handler::list_
private

Definition at line 34 of file manager_impl.hpp.

Referenced by ~pending_event_handler().


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