Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
FunctionUtils::BaseFunction< TReturn, TArgs > Class Template Referenceabstract

Base class for all functions contained in a FunctionContainer. More...

#include <BaseFunction.hpp>

Public Member Functions

virtual ~BaseFunction ()=default
virtual TReturn operator() (TArgs... args) const =0
 Pure virtual function call operator to be implemented by derived functions.
TReturn Call (TArgs... args) const
 External Call function.
virtual FunctionID GetID () const =0
 Pure virtual function to get the unique ID of the function.
virtual std::string GetName () const =0
 Pure virtual function to get the name of the function.

Detailed Description

template<typename TReturn, typename... TArgs>
class FunctionUtils::BaseFunction< TReturn, TArgs >

Base class for all functions contained in a FunctionContainer.

Constructor & Destructor Documentation

◆ ~BaseFunction()

template<typename TReturn, typename... TArgs>
virtual FunctionUtils::BaseFunction< TReturn, TArgs >::~BaseFunction ( )
virtualdefault

Member Function Documentation

◆ Call()

template<typename TReturn, typename... TArgs>
TReturn FunctionUtils::BaseFunction< TReturn, TArgs >::Call ( TArgs... args) const
inline

External Call function.

Parameters
argsArguments to pass to the function.
Returns
Return value of the function.
Note
This function is used to call the wrapped function when using the operator() is not possible.

◆ GetID()

template<typename TReturn, typename... TArgs>
virtual FunctionID FunctionUtils::BaseFunction< TReturn, TArgs >::GetID ( ) const
pure virtual

◆ GetName()

template<typename TReturn, typename... TArgs>
virtual std::string FunctionUtils::BaseFunction< TReturn, TArgs >::GetName ( ) const
pure virtual

◆ operator()()

template<typename TReturn, typename... TArgs>
virtual TReturn FunctionUtils::BaseFunction< TReturn, TArgs >::operator() ( TArgs... args) const
pure virtual

Pure virtual function call operator to be implemented by derived functions.

Parameters
argsArguments to pass to the function.
Returns
Return value of the function.

Implemented in FunctionUtils::CallableFunction< TCallable, TReturn, TArgs >, and FunctionUtils::CallableFunction< TCallable, void, Core & >.


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