libfilezilla
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
simple_event< UniqueType, Values > Class Template Referencefinal

This is the recommended event class. More...

#include <event.hpp>

Inheritance diagram for simple_event< UniqueType, Values >:
Inheritance graph
[legend]
Collaboration diagram for simple_event< UniqueType, Values >:
Collaboration graph
[legend]

Public Types

typedef UniqueType unique_type
 
typedef std::tuple< Values... > tuple_type
 

Public Member Functions

template<typename First_Value , typename... Remaining_Values>
 simple_event (First_Value &&value, Remaining_Values &&...values)
 
 simple_event (simple_event const &op)=default
 
simple_eventoperator= (simple_event const &op)=default
 
virtual size_t derived_type () const
 Simply returns type()
 
- Public Member Functions inherited from event_base
 event_base (event_base const &)=delete
 
event_baseoperator= (event_base const &)=delete
 

Static Public Member Functions

static size_t type ()
 Returns a unique id for the type such that can be used directly in derived_type.
 

Public Attributes

tuple_type v_
 The event value, gets built from the arguments passed in the constructur. More...
 

Detailed Description

template<typename UniqueType, typename... Values>
class fz::simple_event< UniqueType, Values >

This is the recommended event class.

Instanciate the template with a unique type to identify the type of the event and a number of types for the values.

Keep the values simple, in particular avoid mutexes in your values.

See also
event_handler for usage example.
Examples:
events.cpp, and timer_fizzbuzz.cpp.

Member Data Documentation

◆ v_

tuple_type v_
mutable

The event value, gets built from the arguments passed in the constructur.

You don't need to access this member directly if you use the dispatch mechanism.


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