|
Engine²
Open-source game engine written in C++.
|
Abstract class that holds a callable object, to be later stored in a container. More...
#include <CallableFunction.hpp>
Public Member Functions | |
| CallableFunction (TCallable callable) | |
| Constructor for CallableFunction. | |
| ~CallableFunction () override=default | |
| Destructor for CallableFunction. | |
| TReturn | operator() (TArgs... args) const override |
| Calls the stored callable object with the provided arguments. | |
| FunctionID | GetID () const override |
| Returns the unique ID of the callable object. | |
| std::string | GetName () const override |
| Returns the name of the callable object. | |
| Public Member Functions inherited from FunctionUtils::BaseFunction< TReturn, TArgs... > | |
| virtual | ~BaseFunction ()=default |
| TReturn | Call (TArgs... args) const |
| External Call function. | |
Static Public Member Functions | |
| static FunctionID | GetCallableID (TCallable callable) |
| Get the ID of the callable object. | |
| static std::string | GetCallableName (TCallable callable) |
Private Attributes | |
| TCallable | _callable |
| FunctionID | _id = 0 |
| Unique ID for the function. | |
| std::string | _name |
| Name of the function. | |
Abstract class that holds a callable object, to be later stored in a container.
|
inlineexplicit |
Constructor for CallableFunction.
| callable | The callable object to be stored. |
|
overridedefault |
Destructor for CallableFunction.
|
inlinestatic |
Get the ID of the callable object.
| callable | The callable object. |
| TCallable | The type of the callable object. |
|
inlinestatic |
|
inlineoverridevirtual |
Returns the unique ID of the callable object.
Implements FunctionUtils::BaseFunction< TReturn, TArgs... >.
|
inlineoverridevirtual |
Returns the name of the callable object.
Implements FunctionUtils::BaseFunction< TReturn, TArgs... >.
|
inlineoverridevirtual |
Calls the stored callable object with the provided arguments.
| args | Arguments to pass to the callable object. |
Implements FunctionUtils::BaseFunction< TReturn, TArgs... >.
|
private |
|
private |
Unique ID for the function.
|
private |
Name of the function.