-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.hpp
48 lines (42 loc) · 1.05 KB
/
config.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef TWEENERS_CONFIG_HPP
#define TWEENERS_CONFIG_HPP
#include <functional>
namespace tweeners
{
/**
* \brief Customizable types in the tweeners system.
*/
template
<
typename Duration = float,
typename Id = int,
typename Float = float,
template< typename Signature > class Function = std::function
>
struct config
{
/**
* \brief The type used to store the durations in the tweeners.
*
* It must be convertible to float_type or std::chrono::duration.
*/
using duration_type = Duration;
/**
* \brief The type used to identify a slot/tweener.
*
* It must be an integral type since it is used to index vectors.
*/
using id_type = int;
/**
* \brief The default float-like type, used to pass the interpolated values
* in the tweeners' update callbacks.
*/
using float_type = float;
/**
* \brief The type used to store a callable object with a signature S.
*/
template< typename S >
using function_type = Function< S >;
};
}
#endif