Skip to main content

EngineState.ixx File

Game state enumeration and bitmask operations. More...

Included Headers

#include <cstdint> #include <cstddef>

Namespaces Index

namespacehelios
namespaceengine
namespaceruntime
namespaceenginestate
namespacetypes

Description

Game state enumeration and bitmask operations.

File Listing

The file content with the documentation metadata removed is:

1
5module;
6
7#include <cstdint>
8#include <cstddef>
9
10export module helios.engine.runtime.enginestate.types.EngineState;
11
12
13
15
20
21 constexpr size_t EngineStateTypeSize = 16;
22
29
30 Undefined = 0,
31
32 Booting = 1 << 0,
33
34 Booted = 1 << 1,
35
36 Warmup = 1 << 2,
37
38 Running = 1 << 3,
39
40 Shutdown = 1 << 4,
41
42
47
52
53
54 };
55
59 [[nodiscard]] constexpr EngineState operator|(const EngineState lhs, const EngineState rhs) noexcept {
60 return static_cast<EngineState>(static_cast<EngineStateType>(lhs) | static_cast<EngineStateType>(rhs));
61 }
62
66 [[nodiscard]] constexpr EngineState operator&(const EngineState lhs, const EngineState rhs) noexcept {
67 return static_cast<EngineState>(static_cast<EngineStateType>(lhs) & static_cast<EngineStateType>(rhs));
68 }
69
73 [[nodiscard]] constexpr EngineState operator~(const EngineState lhs) noexcept {
75 }
76
77
85 [[nodiscard]] constexpr bool hasFlag(const EngineState mask, const EngineState flag) noexcept {
86 return (mask & flag) == flag;
87 }
88
89}
90

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.