Freeciv21
Develop your civilization from humble roots to a global empire
listener< _type_ > Class Template Reference

#include <listener.h>

+ Collaboration diagram for listener< _type_ >:

Public Types

typedef _type_ type_t
 

Static Public Member Functions

template<class _member_fct_ , class... _args_>
static void invoke (_member_fct_ function, _args_ &&...args)
 

Protected Member Functions

 listener ()
 
virtual ~listener ()
 
void listen ()
 

Static Private Attributes

static std::set< listener< type_t > * > instances {}
 

Detailed Description

template<class _type_>
class listener< _type_ >

Definition at line 93 of file listener.h.

Member Typedef Documentation

◆ type_t

template<class _type_ >
typedef _type_ listener< _type_ >::type_t

Definition at line 96 of file listener.h.

Constructor & Destructor Documentation

◆ listener()

template<class _type_ >
listener< _type_ >::listener ( )
explicitprotecteddefault

◆ ~listener()

template<class _type_ >
listener< _type_ >::~listener
protectedvirtual

Definition at line 131 of file listener.h.

Member Function Documentation

◆ invoke()

template<class _type_ >
template<class _member_fct_ , class... _args_>
void listener< _type_ >::invoke ( _member_fct_  function,
_args_ &&...  args 
)
static

Definition at line 145 of file listener.h.

◆ listen()

template<class _type_ >
void listener< _type_ >::listen
protected

Definition at line 121 of file listener.h.

Member Data Documentation

◆ instances

template<class _type_ >
std::set<listener<type_t> *> listener< _type_ >::instances {}
inlinestaticprivate

Definition at line 100 of file listener.h.