IceShard 1
A personal game engine project, with development focused on 2D/2.5D games.
Loading...
Searching...
No Matches
config_details.hxx
Go to the documentation of this file.
1
3
4#pragma once
5#include <ice/expected.hxx>
6#include <ice/string.hxx>
7
8namespace ice
9{
10
11 static constexpr ice::ErrorCode E_ConfigIsInvalid{ "E.2210:Config:Config is invalid." };
12 static constexpr ice::ErrorCode E_ConfigKeyNotFound{ "E.2211:Config:Config key was not found." };
13 static constexpr ice::ErrorCode E_ConfigIndexOutOfBounds{ "E.2211:Config:Config index was out-of-bounds." };
14 static constexpr ice::ErrorCode E_ConfigValueInvalid{ "E.2215:Config:Config value is not valid." };
15 static constexpr ice::ErrorCode E_ConfigValueNotAnTable{ "E.2216:Config:Config value is not a table." };
16 static constexpr ice::ErrorCode E_ConfigValueNotAnObject{ "E.2217:Config:Config value is not an object." };
17 static constexpr ice::ErrorCode E_ConfigValueTypeMissmatch{ "E.2218:Config:Config value type does not match the requested type." };
18
19 namespace concepts
20 {
21
22 template<typename T>
23 concept ConfigKeyType = std::convertible_to<T, ice::String> || std::convertible_to<T, ice::u32>;
24
25 template<typename T>
26 concept ConfigValueType = std::convertible_to<T, ice::String> || std::is_arithmetic_v<T>;
27
28 } // namespace concepts
29
31 {
32
33 struct ConfigKey;
34 struct ConfigValue;
35 struct ConfigBuilderEntry;
36
37 enum KeyType : ice::u8;
38 enum ValType : ice::u8;
39
40 } // namespace detail
41
42} // namespace ice
Definition config_details.hxx:23
Definition config_details.hxx:26
Definition config_details.hxx:31
SPDX-License-Identifier: MIT.
Definition array.hxx:12
static constexpr ice::ErrorCode E_ConfigValueNotAnObject
Definition config_details.hxx:16
static constexpr ice::ErrorCode E_ConfigValueInvalid
Definition config_details.hxx:14
static constexpr ice::ErrorCode E_ConfigIsInvalid
Definition config_details.hxx:11
static constexpr ice::ErrorCode E_ConfigIndexOutOfBounds
Definition config_details.hxx:13
static constexpr ice::ErrorCode E_ConfigValueTypeMissmatch
Definition config_details.hxx:17
static constexpr ice::ErrorCode E_ConfigValueNotAnTable
Definition config_details.hxx:15
std::uint8_t u8
Definition types.hxx:24
static constexpr ice::ErrorCode E_ConfigKeyNotFound
Definition config_details.hxx:12
Definition error.hxx:19