ReXGlue SDK
Loading...
Searching...
No Matches
setting.h File Reference

Typed settings and the owners that declare them. More...

#include <atomic>
#include <filesystem>
#include <memory>
#include <mutex>
#include <optional>
#include <span>
#include <string>
#include <string_view>
#include <type_traits>
#include <utility>
#include <vector>
#include <rex/module.h>
#include <rex/platform.h>
#include <rex/result.h>
#include <rex/types.h>
#include <rex/utility.h>

Go to the source code of this file.

Classes

struct  rex::SettingConstraints
struct  rex::Range
struct  rex::Allowed
struct  rex::NoSave
struct  rex::DebugOnly
struct  rex::KeyChordTrait
class  rex::SettingBase
class  rex::Setting< T >
class  rex::SettingOwner

Namespaces

namespace  rex

Macros

#define REX_SETTING(Type, name, default_value, help, ...)

Enumerations

enum class  rex::SettingType : u8 {
  kBool , kI32 , kI64 , kU32 ,
  kU64 , kF64 , kString , rex::kPath
}
enum class  rex::SettingLayer : u8 {
  kDefault , rex::kTitle , rex::kFile , rex::kEnvironment ,
  rex::kCommandLine , rex::kRuntime , rex::kLock
}
enum class  rex::SettingLife : u8 { rex::kLive , rex::kRestart , rex::kStartupOnly , kUntilLaunch }

Variables

constexpr SettingLife rex::kRestart = SettingLife::kRestart
constexpr SettingLife rex::kStartupOnly = SettingLife::kStartupOnly
constexpr SettingLife rex::kUntilLaunch = SettingLife::kUntilLaunch
constexpr struct rex::NoSave rex::kNoSave
constexpr struct rex::DebugOnly rex::kDebugOnly
constexpr struct rex::KeyChordTrait rex::kKeyChord

Detailed Description

Typed settings and the owners that declare them.

License
BSD 3-Clause License See LICENSE file in the project root for full license text.

Macro Definition Documentation

◆ REX_SETTING

#define REX_SETTING ( Type,
name,
default_value,
help,
... )
Value:
this, #name, default_value, help __VA_OPT__(, ) __VA_ARGS__ \
}
Definition setting.h:191

Declares a setting inside a SettingOwner.

REX_SETTING(i32, count, 4, "How many", Range{1, 8}, kRestart);
#define REX_SETTING(Type, name, default_value, help,...)
Definition setting.h:451
Parameters
nameThe member name. The full name is the owner's scope plus this.
default_valueA path default may name other paths as {scope.name}.
...Optional traits such as Range, Allowed, kRestart, kStartupOnly and kUntilLaunch.