FastEngine 0.9.3
A multiplayer oriented 2D engine made with Vulkan.
Loading...
Searching...
No Matches
fge::CallbackFunctor< Types > Class Template Reference

Callback functor. More...

#include <C_callback.hpp>

Inheritance diagram for fge::CallbackFunctor< Types >:
fge::CallbackBase< Types... >

Public Types

using CallbackFunction = void (*)(Types... args)
 

Public Member Functions

 CallbackFunctor (fge::CallbackFunctor< Types... >::CallbackFunction func)
 Constructor.
 
void call (Types... args) override
 Call the callback function with the given arguments.
 
bool check (void *ptr) override
 Check if the given pointer is the same as the one used to construct the functor.
 

Protected Attributes

fge::CallbackFunctor< Types... >::CallbackFunction g_function
 

Detailed Description

template<class... Types>
class fge::CallbackFunctor< Types >

Callback functor.

Template Parameters
TypesThe list of arguments types passed to the functor

Constructor & Destructor Documentation

◆ CallbackFunctor()

template<class... Types>
fge::CallbackFunctor< Types >::CallbackFunctor ( fge::CallbackFunctor< Types... >::CallbackFunction func)
explicit

Constructor.

Parameters
funcThe callback function

Member Function Documentation

◆ call()

template<class... Types>
void fge::CallbackFunctor< Types >::call ( Types... args)
overridevirtual

Call the callback function with the given arguments.

Parameters
argsThe list of arguments

Implements fge::CallbackBase< Types... >.

◆ check()

template<class... Types>
bool fge::CallbackFunctor< Types >::check ( void * ptr)
inlineoverridevirtual

Check if the given pointer is the same as the one used to construct the functor.

Parameters
ptrThe pointer to check
Returns
True if the given pointer is the same as the one used to construct the functor

Implements fge::CallbackBase< Types... >.


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