StormByte C++ Library: Config module 1.0.1.9999
StormByte-Config is the configuration module of the StormByte C++ suite.
Loading...
Searching...
No Matches
typedefs.hxx
1/*
2 * Copyright (C) 2024-2026 David C. Manuelda (StormBytePP)
3 *
4 * This file is part of StormByte-Config.
5 *
6 * StormByte-Config is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License version 3
8 * or later, as published by the Free Software Foundation.
9 *
10 * StormByte-Config is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with StormByte-Config. If not, see
17 * <https://www.gnu.org/licenses/lgpl-3.0.html>.
18 */
19
20#pragma once
21
22#include <StormByte/exception.hxx>
23#include <StormByte/expected.hxx>
24
28namespace StormByte::Config {
29 class Config;
30
35 enum class OnExistingAction: unsigned short {
36 Keep,
37 Overwrite,
39 };
40
51 enum class Mode: unsigned short {
52 Text,
53 Binary
54 };
55
62 using ExpectedConfig = StormByte::Expected<Config, StormByte::Exception>;
63}
Config module of the StormByte suite.
Definition alias.hxx:29
OnExistingAction
Forward declaration of the configuration document.
Definition typedefs.hxx:35
@ Keep
Retain the existing item.
@ Overwrite
Replace the existing item with the new one.
@ ThrowException
Throw an exception to indicate the conflict.
StormByte::Expected< Config, StormByte::Exception > ExpectedConfig
Result of loading a configuration document (text or binary).
Definition typedefs.hxx:62
Mode
Serialization / deserialization mode for configuration documents.
Definition typedefs.hxx:51
@ Text
Human-readable configuration syntax (UTF-8 text).