EngineState.ixx File
Game state enumeration and bitmask operations. More...
Included Headers
#include <cstdint>
#include <cstddef>
Namespaces Index
| namespace | helios |
| namespace | engine |
| namespace | runtime |
| namespace | enginestate |
| namespace | types |
Description
Game state enumeration and bitmask operations.
File Listing
The file content with the documentation metadata removed is:
14export namespace helios::engine::runtime::enginestate::types {
19 using EngineStateType = uint16_t;
21 constexpr size_t EngineStateTypeSize = 16;
28 enum class EngineState : EngineStateType {
30 Undefined = 0,
32 Booting = 1 << 0,
34 Booted = 1 << 1,
36 Warmup = 1 << 2,
38 Running = 1 << 3,
40 Shutdown = 1 << 4,
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));
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));
73 [[nodiscard]] constexpr EngineState operator~(const EngineState lhs) noexcept {
74 return static_cast<EngineState>((~static_cast<EngineStateType>(lhs)) & static_cast<EngineStateType>(EngineState::Any));
85 [[nodiscard]] constexpr bool hasFlag(const EngineState mask, const EngineState flag) noexcept {
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.