HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Data Structures | Namespaces | Enumerations | Functions | Variables
global_state.hpp File Reference

An atomic access global variable for quick access to state of the system. More...

#include "../utility/utility.hpp"
#include "../macros.hpp"
#include <utility>
#include <atomic>
#include <type_traits>
#include <bit>

Go to the source code of this file.

Data Structures

struct  std::atomic< hi::global_state_type >
 

Namespaces

namespace  hi
 The HikoGUI namespace.
 
namespace  hi::v1
 The HikoGUI API version 1.
 

Enumerations

enum class  hi::v1::global_state_type : uint64_t {
  log_debug = 0x01 , log_info = 0x02 , log_statistics = 0x04 , log_trace = 0x08 ,
  log_audit = 0x10 , log_warning = 0x20 , log_error = 0x40 , log_fatal = 0x80 ,
  log_mask = log_debug | log_info | log_statistics | log_trace | log_audit | log_warning | log_error | log_fatal , log_level_default = log_audit | log_error | log_fatal , log_level_fatal = log_audit | log_fatal , log_level_error = log_trace | log_error | log_level_fatal ,
  log_level_warning = log_warning | log_level_error , log_level_info = log_info | log_statistics | log_level_warning , log_level_debug = log_debug | log_level_info , log_is_running = 0x1'00 ,
  time_stamp_utc_is_running = 0x2'00 , system_is_running = 0x1'000000'00 , system_is_shutting_down = 0x2'000000'00 , system_mask = system_is_running | system_is_shutting_down
}
 The flag-type used for global state. More...
 

Functions

 hi_export_module (hikogui.concurrency.global_state)
 
 hi_warning_push ()
 
 hi_warning_ignore_msvc (26490)
 
constexpr global_state_type hi::v1::operator| (global_state_type lhs, global_state_type rhs) noexcept
 
constexpr global_state_type hi::v1::operator& (global_state_type lhs, global_state_type rhs) noexcept
 
constexpr global_state_type hi::v1::operator~ (global_state_type rhs) noexcept
 
constexpr bool hi::v1::to_bool (global_state_type rhs) noexcept
 
constexpr bool hi::v1::is_system_running (global_state_type rhs) noexcept
 
constexpr bool hi::v1::is_system_shutting_down (global_state_type rhs) noexcept
 
bool hi::v1::is_system_running () noexcept
 Check if the HikoGUI system is running.
 
bool hi::v1::is_system_shutting_down () noexcept
 Check if the HikoGUI system is being shut down.
 
void hi::v1::set_log_level (global_state_type log_level) noexcept
 Set the logging level.
 
bool hi::v1::global_state_disable (global_state_type subsystem, std::memory_order order=std::memory_order::seq_cst) noexcept
 Disable a subsystem.
 
bool hi::v1::global_state_enable (global_state_type subsystem, std::memory_order order=std::memory_order::seq_cst) noexcept
 Enable a subsystem.
 
 hi_warning_pop ()
 

Variables

std::atomic< global_state_typehi::v1::global_state = global_state_type::log_level_default
 The global state of the hikogui framework.
 

Detailed Description

An atomic access global variable for quick access to state of the system.