2024-03-18 11:25:15 +01:00
|
|
|
#pragma once
|
|
|
|
|
2024-04-25 11:49:09 +02:00
|
|
|
#ifndef PP_DEBUG
|
2024-03-18 11:25:15 +01:00
|
|
|
#include <filesystem>
|
|
|
|
|
|
|
|
#include <config.hpp>
|
2024-04-25 12:14:41 +02:00
|
|
|
#endif
|
2024-03-18 11:25:15 +01:00
|
|
|
|
2024-04-24 23:36:25 +02:00
|
|
|
namespace fs = std::filesystem;
|
|
|
|
|
2024-04-19 09:39:57 +02:00
|
|
|
#define CONFIG(name, ...) name parse##name(fs::path configPath);
|
|
|
|
#define SECTION(name, ...)
|
|
|
|
|
|
|
|
#define VAR_UINT(section, name)
|
|
|
|
#define VAR_UINT_D(section, name, default)
|
|
|
|
|
|
|
|
#define VAR_INT(section, name)
|
|
|
|
#define VAR_INT_D(section, name, default)
|
|
|
|
|
|
|
|
#define VAR_STRING(section, name)
|
|
|
|
#define VAR_STRING_D(section, name, default)
|
|
|
|
|
|
|
|
#define VAR_BOOL(section, name)
|
|
|
|
#define VAR_BOOL_D(section, name, default)
|
|
|
|
|
|
|
|
#define VAR_FLOAT(section, name)
|
|
|
|
#define VAR_FLOAT_D(section, name, default)
|
|
|
|
|
|
|
|
#define VAR_COLOUR(section, name)
|
|
|
|
#define VAR_COLOUR_D(section, name, default)
|
|
|
|
|
|
|
|
#define ENUM(name, ...)
|
|
|
|
#define VAR_ENUM(section, name, enum_type)
|
|
|
|
#define VAR_ENUM_D(section, name, enum_type, default)
|
|
|
|
|
2024-04-20 13:37:06 +02:00
|
|
|
#define STRUCT_INPUT_STREAM_OP(name, ...)
|
|
|
|
#define STRUCT_OUTPUT_STREAM_OP(name, ...)
|
2024-04-19 09:39:57 +02:00
|
|
|
#define STRUCT_STREAM_OPS(name, ...)
|
|
|
|
|
|
|
|
#define STRUCT(name, ...)
|
|
|
|
#define VAR_STRUCT(section, name, struct_type)
|
|
|
|
#define VAR_STRUCT_D(section, name, struct_type, default)
|
|
|
|
|
|
|
|
#define VAR_LIST(section, name, type)
|
|
|
|
#define VAR_LIST_SEP(section, name, type, sep)
|
2024-04-21 10:40:43 +02:00
|
|
|
#define VAR_LIST_SEP_P(section, name, type, sep)
|
2024-04-19 09:39:57 +02:00
|
|
|
#define VAR_LIST_NUMBERED(section, name, type)
|
|
|
|
|
|
|
|
#include <config_def.hpp>
|
|
|
|
|
|
|
|
#undef CONFIG
|
|
|
|
#undef SECTION
|
|
|
|
|
|
|
|
#undef VAR_UINT
|
|
|
|
#undef VAR_UINT_D
|
|
|
|
|
|
|
|
#undef VAR_INT
|
|
|
|
#undef VAR_INT_D
|
|
|
|
|
|
|
|
#undef VAR_STRING
|
|
|
|
#undef VAR_STRING_D
|
|
|
|
|
|
|
|
#undef VAR_BOOL
|
|
|
|
#undef VAR_BOOL_D
|
|
|
|
|
|
|
|
#undef VAR_FLOAT
|
|
|
|
#undef VAR_FLOAT_D
|
|
|
|
|
|
|
|
#undef VAR_COLOUR
|
|
|
|
#undef VAR_COLOUR_D
|
|
|
|
|
|
|
|
#undef ENUM
|
|
|
|
#undef VAR_ENUM
|
|
|
|
#undef VAR_ENUM_D
|
|
|
|
|
2024-04-20 13:37:06 +02:00
|
|
|
#undef STRUCT_INPUT_STREAM_OP
|
|
|
|
#undef STRUCT_OUTPUT_STREAM_OP
|
2024-04-19 09:39:57 +02:00
|
|
|
#undef STRUCT_STREAM_OPS
|
|
|
|
|
|
|
|
#undef STRUCT
|
|
|
|
#undef VAR_STRUCT
|
|
|
|
#undef VAR_STRUCT_D
|
|
|
|
|
|
|
|
#undef VAR_LIST
|
|
|
|
#undef VAR_LIST_SEP
|
2024-04-21 10:40:43 +02:00
|
|
|
#undef VAR_LIST_SEP_P
|
2024-04-19 09:39:57 +02:00
|
|
|
#undef VAR_LIST_NUMBERED
|