Saga
Saga Game Engine
Loading...
Searching...
No Matches
Saga::Callback< DataType > Class Template Reference

A wrapper around a shared_ptr to a function. More...

#include <eventmap.h>

Inheritance diagram for Saga::Callback< DataType >:
Collaboration diagram for Saga::Callback< DataType >:

Public Member Functions

 Callback (std::shared_ptr< std::function< void(DataType...)> > func)
 
void evoke (DataType... args)
 Call the function this stores.
 
- Public Member Functions inherited from Saga::ICallback
virtual ~ICallback ()=default
 

Detailed Description

template<typename ... DataType>
class Saga::Callback< DataType >

A wrapper around a shared_ptr to a function.

Template Parameters
DataTypethe types of data the function accepts.

Constructor & Destructor Documentation

◆ Callback()

template<typename ... DataType>
Saga::Callback< DataType >::Callback ( std::shared_ptr< std::function< void(DataType...)> >  func)
inline

Member Function Documentation

◆ evoke()

template<typename ... DataType>
void Saga::Callback< DataType >::evoke ( DataType...  args)
inline

Call the function this stores.

Parameters
argsthe parameters to the function.

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