Silicon
A realtime platform for creating interactive media.
Si::Sub< T > Class Template Reference

The Subscriber class allows you to listen in on published events of type T. More...

#include <Event.hpp>

Public Member Functions

 Sub (Callback func)
 Creates a new subscriber with the function to call on an event publish. More...
 
 ~Sub ()
 

Friends

void Si::Pub (const T &data)
 

Detailed Description

template<typename T>
class Si::Sub< T >

The Subscriber class allows you to listen in on published events of type T.

Template Parameters
TThe type of event to listen to.

Definition at line 66 of file Event.hpp.

Constructor & Destructor Documentation

◆ Sub()

template<typename T >
Si::Sub< T >::Sub ( Callback  func)
inlineexplicit

Creates a new subscriber with the function to call on an event publish.

Parameters
funcThe function to run when the event is called.

Definition at line 76 of file Event.hpp.

◆ ~Sub()

template<typename T >
Si::Sub< T >::~Sub ( )
inline

Definition at line 82 of file Event.hpp.

Friends And Related Function Documentation

◆ Si::Pub

template<typename T >
void Si::Pub ( const T &  data)
friend

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