VIPRA Documentation
Loading...
Searching...
No Matches
include
vipra
vipra_behaviors
util
bool_latch.hpp
1
#pragma once
2
3
#include "vipra/vipra_behaviors/util/class_types.hpp"
4
5
namespace
VIPRA::Behaviors {
10
class
Latch
{
11
DEFAULT_CONSTRUCTIBLE(
Latch
)
12
COPYABLE(
Latch
)
13
MOVEABLE(
Latch
)
14
public
:
15
inline
void
latch() { _set =
true
; }
16
17
inline
void
unlatch() { _set =
false
; }
18
19
[[nodiscard]]
inline
explicit
operator
bool()
const
{
return
_set; }
20
21
private
:
22
bool
_set =
false
;
23
};
24
}
// namespace VIPRA::Behaviors
VIPRA::Behaviors::Latch
Literally a boolean with extra syntax.
Definition
bool_latch.hpp:10
Generated by
1.13.2