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 
12 namespace globjects
13 {
14 
15 
16 template <typename... Arguments>
18 {
19 public:
20  using FunctionPointer = void (*)(Arguments...);
21 
22  FunctionCall();
23  FunctionCall(FunctionPointer function, Arguments... arguments);
24 
25  virtual void operator()() override;
26  virtual void * identifier() const override;
27 
28 protected:
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>
Definition: FunctionCall.h:17
std::tuple< Arguments... > m_arguments
Definition: FunctionCall.h:31
Contains all the classes that wrap OpenGL functionality.
The interface for a callable function with variadic argument types.
Definition: AbstractFunctionCall.h:17
void(*)(Arguments...) FunctionPointer
Definition: FunctionCall.h:20
std::function< void(Arguments...)> m_function
Definition: FunctionCall.h:30
virtual void * identifier() const override
Accessor for an arbitrary identifier that can be used as identity.
virtual void operator()() override
Entry point for the main functionality of a subclass.
FunctionPointer m_functionPointer
Definition: FunctionCall.h:29