The Battle for Wesnoth  1.19.7+dev
Public Member Functions | Private Attributes | List of all members
events::generic_event Class Reference

#include <generic_event.hpp>

Public Member Functions

 generic_event (const std::string &name)
 
virtual ~generic_event ()
 
virtual bool attach_handler (observer *obs)
 
virtual bool detach_handler (observer *obs)
 
virtual void notify_observers ()
 

Private Attributes

std::string name_
 
std::vector< observer * > observers_
 
bool change_handler_
 
bool notify_active_
 

Detailed Description

Definition at line 44 of file generic_event.hpp.

Constructor & Destructor Documentation

◆ generic_event()

events::generic_event::generic_event ( const std::string &  name)

Definition at line 22 of file generic_event.cpp.

◆ ~generic_event()

virtual events::generic_event::~generic_event ( )
inlinevirtual

Definition at line 47 of file generic_event.hpp.

Member Function Documentation

◆ attach_handler()

bool events::generic_event::attach_handler ( observer obs)
virtual

◆ detach_handler()

bool events::generic_event::detach_handler ( observer obs)
virtual

◆ notify_observers()

void events::generic_event::notify_observers ( )
virtual

Member Data Documentation

◆ change_handler_

bool events::generic_event::change_handler_
private

Definition at line 61 of file generic_event.hpp.

Referenced by attach_handler(), detach_handler(), and notify_observers().

◆ name_

std::string events::generic_event::name_
private

Definition at line 54 of file generic_event.hpp.

Referenced by notify_observers().

◆ notify_active_

bool events::generic_event::notify_active_
private

Definition at line 65 of file generic_event.hpp.

Referenced by attach_handler(), detach_handler(), and notify_observers().

◆ observers_

std::vector<observer*> events::generic_event::observers_
private

Definition at line 57 of file generic_event.hpp.

Referenced by attach_handler(), detach_handler(), and notify_observers().


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