glbinding  3.3.0.0
A C++ binding for the OpenGL API, generated using the gl.xml specification.
Loading...
Searching...
No Matches
Boolean8.inl
Go to the documentation of this file.
1
2#pragma once
3
4
5namespace glbinding
6{
7
8
13
15: m_value(static_cast<underlying_type>(value))
16{
17}
18
20: m_value(value)
21{
22}
23
25: m_value(static_cast<underlying_type>(value))
26{
27}
28
30: m_value(static_cast<underlying_type>(value))
31{
32}
33
35: m_value(static_cast<underlying_type>(value))
36{
37}
38
39GLBINDING_CONSTEXPR Boolean8::operator bool() const
40{
41 return m_value != 0;
42}
43
44GLBINDING_CONSTEXPR Boolean8::operator char() const
45{
46 return m_value;
47}
48
49GLBINDING_CONSTEXPR Boolean8::operator unsigned char() const
50{
51 return m_value;
52}
53
54GLBINDING_CONSTEXPR Boolean8::operator int() const
55{
56 return m_value;
57}
58
59GLBINDING_CONSTEXPR Boolean8::operator unsigned int() const
60{
61 return m_value;
62}
63
68
73
78
83
88
93
94
95} // namespace glbinding
96
97
98namespace std
99{
100
101
102template<>
103struct hash<glbinding::Boolean8>
104{
105 std::size_t operator()(const glbinding::Boolean8 & boolean) const
106 {
107 return hash<glbinding::Boolean8::underlying_type>()(static_cast<glbinding::Boolean8::underlying_type>(boolean));
108 }
109};
110
111
112} // namespace std
Boolean type based on an 8-bit integer.
Definition Boolean8.h:20
GLBINDING_CONSTEXPR bool operator<(const Boolean8 &other) const
Comparison operator.
Definition Boolean8.inl:64
GLBINDING_CONSTEXPR bool operator==(const Boolean8 &other) const
Comparison operator.
Definition Boolean8.inl:84
GLBINDING_CONSTEXPR bool operator>=(const Boolean8 &other) const
Comparison operator.
Definition Boolean8.inl:79
GLBINDING_CONSTEXPR bool operator<=(const Boolean8 &other) const
Comparison operator.
Definition Boolean8.inl:74
underlying_type m_value
Value
Definition Boolean8.h:215
GLBINDING_CONSTEXPR Boolean8()
Constructor.
Definition Boolean8.inl:9
GLBINDING_CONSTEXPR bool operator!=(const Boolean8 &other) const
Comparison operator.
Definition Boolean8.inl:89
GLBINDING_CONSTEXPR bool operator>(const Boolean8 &other) const
Comparison operator.
Definition Boolean8.inl:69
The Value class represents a printable wrapper around an OpenGL data type.
Definition Value.h:30
const T m_value
The value.
Definition Value.h:60
Contains all the classes of glbinding.