3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
Loading...
Searching...
No Matches
Engine3DRadSpace.Reflection::MultiEvent Class Reference

MultiEvent is a collection of function pointers with the same return type and arguments that can be invoked together. More...

#include <MultiEvent.hpp>

Inheritance diagram for Engine3DRadSpace.Reflection::MultiEvent:
Collaboration diagram for Engine3DRadSpace.Reflection::MultiEvent:

Public Member Functions

 MultiEvent ()=default
 Constructs a MultiEvent with no callbacks.
 MultiEvent (std::function< Any(std::vector< Any >)> callback)
 Constructs a MultiEvent with a single callback.
void Bind (std::function< Any(std::vector< Any >)> callback) override
 Binds an typeless function to this event.
Any operator() (std::vector< Any > &args) override
 Calls all the bound functions and returns a vector of their return values.
void Reset () noexcept override
 Unbinds all the stored functions.
Public Member Functions inherited from Engine3DRadSpace.Reflection::IEvent
virtual ~IEvent ()=default

Additional Inherited Members

Protected Member Functions inherited from Engine3DRadSpace.Reflection::IEvent
 IEvent ()=default

Detailed Description

MultiEvent is a collection of function pointers with the same return type and arguments that can be invoked together.

Constructor & Destructor Documentation

◆ MultiEvent() [1/2]

Engine3DRadSpace.Reflection::MultiEvent::MultiEvent ( )
default

Constructs a MultiEvent with no callbacks.

◆ MultiEvent() [2/2]

MultiEvent::MultiEvent ( std::function< Any(std::vector< Any >)> callback)

Constructs a MultiEvent with a single callback.

Parameters
callback

Member Function Documentation

◆ Bind()

void MultiEvent::Bind ( std::function< Any(std::vector< Any >)> callback)
overridevirtual

Binds an typeless function to this event.

Parameters
callbacktypeless callback function

Implements Engine3DRadSpace.Reflection::IEvent.

◆ operator()()

Any MultiEvent::operator() ( std::vector< Any > & args)
overridevirtual

Calls all the bound functions and returns a vector of their return values.

Parameters
argsThe arguments to pass to each bound function.
Returns
A vector containing the return values of each bound function.

Implements Engine3DRadSpace.Reflection::IEvent.

◆ Reset()

void MultiEvent::Reset ( )
overridevirtualnoexcept

Unbinds all the stored functions.

Implements Engine3DRadSpace.Reflection::IEvent.


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