OGLplus  (0.59.0) a C++ wrapper for rendering APIs

constants.hpp
Go to the documentation of this file.
1 #ifndef OALPLUS_ALUT_API_CONSTANTS_HPP
9 #define OALPLUS_ALUT_API_CONSTANTS_HPP
10 
11 #include "c_api.hpp"
12 #include "enum_types.hpp"
13 
14 namespace eagine::oalp {
15 //------------------------------------------------------------------------------
20 template <typename ApiTraits>
22 public:
23  using enum_type = typename alut_types::enum_type;
25  template <enum_type value>
26  using enum_type_c = std::integral_constant<enum_type, value>;
27 
32 #ifdef ALUT_ERROR_NO_ERROR
33  enum_type_c<ALUT_ERROR_NO_ERROR>>
34 #else
36 #endif
38 
43 #ifdef ALUT_WAVEFORM_SINE
44  enum_type_c<ALUT_WAVEFORM_SINE>>
45 #else
47 #endif
49 
54 #ifdef ALUT_WAVEFORM_SQUARE
55  enum_type_c<ALUT_WAVEFORM_SQUARE>>
56 #else
58 #endif
60 
65 #ifdef ALUT_WAVEFORM_SAWTOOTH
66  enum_type_c<ALUT_WAVEFORM_SAWTOOTH>>
67 #else
69 #endif
71 
76 #ifdef ALUT_WAVEFORM_WHITENOISE
77  enum_type_c<ALUT_WAVEFORM_WHITENOISE>>
78 #else
80 #endif
82 
87 #ifdef ALUT_WAVEFORM_IMPULSE
88  enum_type_c<ALUT_WAVEFORM_IMPULSE>>
89 #else
91 #endif
93 
94  basic_alut_constants(ApiTraits& traits, basic_alut_c_api<ApiTraits>& api);
95 };
96 //------------------------------------------------------------------------------
97 } // namespace eagine::oalp
98 
99 #endif // OALPLUS_ALUT_API_CONSTANTS_HPP
typename get_opt_c_api_constant< ClassList, Constant, Tag, IsIndexed >::type opt_c_api_constant
Template alias used for switching between static and dynamic constants.
Definition: c_api_wrap.hpp:175
opt_c_api_constant< mp_list< waveform_function >, enum_type_i > waveform_sine
Definition: constants.hpp:48
opt_c_api_constant< mp_list< alut_error_code >, enum_type_i > no_error
Definition: constants.hpp:37
opt_c_api_constant< mp_list< waveform_function >, enum_type_i > waveform_sawtooth
Definition: constants.hpp:70
opt_c_api_constant< mp_list< waveform_function >, enum_type_i > waveform_square
Definition: constants.hpp:59
al_types::enum_type enum_type
Enum type.
Definition: config.hpp:40
opt_c_api_constant< mp_list< waveform_function >, enum_type_i > waveform_impulse
Definition: constants.hpp:92
Class wrapping the C-functions from the ALUT API.
Definition: c_api.hpp:31
Compile-time type list template.
Definition: mp_list.hpp:20
Class wrapping the constants from the ALUT API.
Definition: constants.hpp:21
Template type used mostly for function type-tag dispatching.
Definition: type_identity.hpp:19
AL-related code is placed in this namespace.
Definition: oalplus.hpp:11
opt_c_api_constant< mp_list< waveform_function >, enum_type_i > waveform_whitenoise
Definition: constants.hpp:81

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).