FunctionCall.h
Go to the documentation of this file.
#pragma once
#include <functional>
#include <tuple>
#include <globjects/globjects_api.h>
#include <globjects/base/AbstractFunctionCall.h>
namespace globjects
{
template <typename... Arguments>
class FunctionCall : public AbstractFunctionCall
{
public:
using FunctionPointer = void (*)(Arguments...);
FunctionCall();
FunctionCall(FunctionPointer function, Arguments... arguments);
virtual void operator()() override;
virtual void * identifier() const override;
protected:
mutable FunctionPointer m_functionPointer;
std::function<void(Arguments...)> m_function;
std::tuple<Arguments...> m_arguments;
};
} // namespace globjects
#include <globjects/base/FunctionCall.inl>
globjects::FunctionCall
Definition: FunctionCall.h:17
globjects::FunctionCall::m_arguments
std::tuple< Arguments... > m_arguments
Definition: FunctionCall.h:31
globjects
Contains all the classes that wrap OpenGL functionality.
globjects::AbstractFunctionCall
The interface for a callable function with variadic argument types.
Definition: AbstractFunctionCall.h:17
globjects::FunctionCall::FunctionPointer
void(*)(Arguments...) FunctionPointer
Definition: FunctionCall.h:20
AbstractFunctionCall.h
globjects::FunctionCall::FunctionCall
FunctionCall()
globjects::FunctionCall::m_function
std::function< void(Arguments...)> m_function
Definition: FunctionCall.h:30
globjects::FunctionCall::identifier
virtual void * identifier() const override
Accessor for an arbitrary identifier that can be used as identity.
globjects::FunctionCall::operator()
virtual void operator()() override
Entry point for the main functionality of a subclass.
globjects::FunctionCall::m_functionPointer
FunctionPointer m_functionPointer
Definition: FunctionCall.h:29