OGLplus
(0.59.0)
a C++ wrapper for rendering APIs
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
Functions
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
Variables
Typedefs
a
b
c
d
e
g
h
i
k
l
m
n
o
p
r
s
t
u
v
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
u
v
Related Functions
o
Files
File List
File Members
All
Macros
Examples
oalplus
basic_alc_api.hpp
Go to the documentation of this file.
1
#ifndef OALPLUS_BASIC_ALC_API_HPP
9
#define OALPLUS_BASIC_ALC_API_HPP
10
11
#include "
alc_api/api.hpp
"
12
#include "
alc_api/api_traits.hpp
"
13
#include "
alc_api/constants.hpp
"
14
15
namespace
eagine::oalp
{
16
//------------------------------------------------------------------------------
17
template
<
typename
ApiTraits>
18
class
basic_alc_api
19
:
protected
ApiTraits
20
,
public
basic_alc_operations<ApiTraits>
21
,
public
basic_alc_constants<ApiTraits> {
22
public
:
23
basic_alc_api(ApiTraits traits)
24
: ApiTraits{std::move(traits)}
25
, basic_alc_operations<ApiTraits>{*
static_cast<
ApiTraits*
>
(
this
)}
26
, basic_alc_constants<ApiTraits>{
27
*
static_cast<
ApiTraits*
>
(
this
),
28
*
static_cast<
basic_alc_operations<ApiTraits>*
>
(
this
)} {}
29
30
basic_alc_api()
31
: basic_alc_api{ApiTraits{}} {}
32
};
33
34
template
<std::
size_t
I,
typename
ApiTraits>
35
auto
get(basic_alc_api<ApiTraits>& x) noexcept ->
36
typename
std::tuple_element<I, basic_alc_api<ApiTraits>>::type& {
37
return
x;
38
}
39
40
template
<std::
size_t
I,
typename
ApiTraits>
41
auto
get(
const
basic_alc_api<ApiTraits>& x) noexcept ->
const
42
typename
std::tuple_element<I, basic_alc_api<ApiTraits>>::type& {
43
return
x;
44
}
45
//------------------------------------------------------------------------------
46
}
// namespace eagine::oalp
47
48
// NOLINTNEXTLINE(cert-dcl58-cpp)
49
namespace
std {
50
51
template
<
typename
ApiTraits>
52
struct
tuple_size<
eagine
::oalp::basic_alc_api<ApiTraits>>
53
:
public
std::integral_constant<std::size_t, 2> {};
54
55
template
<
typename
ApiTraits>
56
struct
tuple_element<0,
eagine
::oalp::basic_alc_api<ApiTraits>> {
57
using
type =
eagine::oalp::basic_alc_operations<ApiTraits>
;
58
};
59
60
template
<
typename
ApiTraits>
61
struct
tuple_element<1,
eagine
::oalp::basic_alc_api<ApiTraits>> {
62
using
type =
eagine::oalp::basic_alc_constants<ApiTraits>
;
63
};
64
65
}
// namespace std
66
67
#endif // OALPLUS_BASIC_ALC_API_HPP
eagine::oalp::basic_alc_operations
Class wrapping the functions from the ALC API.
Definition:
api.hpp:26
eagine
Common code is placed in this namespace.
Definition:
eagine.hpp:21
api.hpp
constants.hpp
eagine::oalp::basic_alc_constants
Class wrapping the constants from the ALC API.
Definition:
constants.hpp:21
eagine::oalp
AL-related code is placed in this namespace.
Definition:
oalplus.hpp:11
api_traits.hpp
Copyright © 2015-2021
Matúš Chochlík
.
<
chochlik -at -gmail.com
>
Documentation generated on Tue Apr 13 2021 by
Doxygen
(version 1.8.17).