globjects  1.0.0.000000000000
Strict OpenGL objects wrapper.
FunctionCall.h
Go to the documentation of this file.
1
2#pragma once
3
4#include <functional>
5#include <tuple>
6
7#include <globjects/globjects_api.h>
8
10
11
12namespace globjects
13{
14
15
16template <typename... Arguments>
18{
19public:
20 using FunctionPointer = void (*)(Arguments...);
21
23 FunctionCall(FunctionPointer function, Arguments... arguments);
24
25 virtual void operator()() override;
26 virtual void * identifier() const override;
27
28protected:
30 std::function<void(Arguments...)> m_function;
31 std::tuple<Arguments...> m_arguments;
32};
33
34
35} // namespace globjects
36
37
38#include <globjects/base/FunctionCall.inl>
The interface for a callable function with variadic argument types.
Definition: AbstractFunctionCall.h:18
Definition: FunctionCall.h:18
virtual void * identifier() const override
Accessor for an arbitrary identifier that can be used as identity.
std::function< void(Arguments...)> m_function
Definition: FunctionCall.h:30
FunctionCall(FunctionPointer function, Arguments... arguments)
FunctionPointer m_functionPointer
Definition: FunctionCall.h:29
std::tuple< Arguments... > m_arguments
Definition: FunctionCall.h:31
virtual void operator()() override
Entry point for the main functionality of a subclass.
void(*)(Arguments...) FunctionPointer
Definition: FunctionCall.h:20
Contains all the classes that wrap OpenGL functionality.