#include "CoreMinimal.h"
#include "HAL/PreprocessorHelpers.h"
#include "boost/preprocessor.hpp"
#include "Misc/EngineVersionComparison.h"
Go to the source code of this file.
|
| #define | PREPROCESSOR_TO_TEXT(x) |
| |
| #define | MACRO_OVERLOAD(prefix, ...) |
| | Implement preprocessor function overloading based on argument count for a set of macros following a distinct convention. Individual overloads must have a trailing number corresponding to the number of arguments they accept.
|
| |
| #define | DEFAULT_ON_EMPTY(value, default) |
| | Returns given default value when input value is empty.
|
| |
| #define | MCRO_VERSION_NUM_2(major, minor) |
| |
| #define | MCRO_VERSION_NUM_3(major, minor, patch) |
| |
| #define | MCRO_VERSION_NUM_4(major, minor, patch, rev) |
| |
| #define | VERSION_NUM(...) |
| | Store a semantic version in an uint64 number.
|
| |
| #define | UNREAL_VERSION_NUM VERSION_NUM(ENGINE_MAJOR_VERSION, ENGINE_MINOR_VERSION, ENGINE_PATCH_VERSION) |
| | VERSION_NUM representation of current Engine version.
|
| |
| #define | UNREAL_VERSION(op, ...) |
| | Macro for conveniently comparing unreal version for code compile compatibility cases.
|
| |
| #define | MCRO_FORWARD_FUNCTION Forward |
| |
| #define | FWD(...) |
| | Shorten forwarding expression with this macro so one may not need to specify explicit type.
|
| |
- Copyright
- This Source Code is subject to the terms of the Mozilla Public License, v2.0. If a copy of the MPL was not distributed with this file You can obtain one at https://mozilla.org/MPL/2.0/
- Author
- David Mórász
- Date
- 2025
Definition in file Macros.h.
◆ DEFAULT_ON_EMPTY
| #define DEFAULT_ON_EMPTY |
( |
| value, |
|
|
| default ) |
Value:BOOST_PP_IF(BOOST_PP_CHECK_EMPTY(value), default, value)
Returns given default value when input value is empty.
Definition at line 74 of file Macros.h.
◆ FWD
Value:
#define MCRO_FORWARD_FUNCTION
Shorten forwarding expression with this macro so one may not need to specify explicit type.
Definition at line 134 of file Macros.h.
◆ MACRO_OVERLOAD
| #define MACRO_OVERLOAD |
( |
| prefix, |
|
|
| ... ) |
Value:PREPROCESSOR_APPEND_VA_ARG_COUNT(prefix, __VA_ARGS__)(__VA_ARGS__)
Implement preprocessor function overloading based on argument count for a set of macros following a distinct convention. Individual overloads must have a trailing number corresponding to the number of arguments they accept.
For example:
#define FOO_3(a, b, c) a##b##c
#define FOO_2(a, b) a##b
#define FOO_1(a) a
#define FOO(...) MACRO_OVERLOAD(FOO_, __VA_ARGS__)
FOO(1)
FOO(1, 2)
FOO(1, 2, 3)
Definition at line 71 of file Macros.h.
◆ MCRO_FORWARD_FUNCTION
| #define MCRO_FORWARD_FUNCTION Forward |
◆ MCRO_VERSION_NUM_2
| #define MCRO_VERSION_NUM_2 |
( |
| major, |
|
|
| minor ) |
Value: ( ((0x000000000000FFFFULL & major) << 48) \
| ((0x000000000000FFFFULL & minor) << 32) \
)
Definition at line 76 of file Macros.h.
◆ MCRO_VERSION_NUM_3
| #define MCRO_VERSION_NUM_3 |
( |
| major, |
|
|
| minor, |
|
|
| patch ) |
Value: ( ((0x000000000000FFFFULL & major) << 48) \
| ((0x000000000000FFFFULL & minor) << 32) \
| ((0x000000000000FFFFULL & patch) << 16) \
)
Definition at line 81 of file Macros.h.
◆ MCRO_VERSION_NUM_4
| #define MCRO_VERSION_NUM_4 |
( |
| major, |
|
|
| minor, |
|
|
| patch, |
|
|
| rev ) |
Value: ( ((0x000000000000FFFFULL & major) << 48) \
| ((0x000000000000FFFFULL & minor) << 32) \
| ((0x000000000000FFFFULL & patch) << 16) \
| ((0x000000000000FFFFULL & rev) << 0) \
)
Definition at line 87 of file Macros.h.
◆ PREPROCESSOR_TO_TEXT
| #define PREPROCESSOR_TO_TEXT |
( |
| x | ) |
|
Value:TEXT(PREPROCESSOR_TO_STRING(x))
Definition at line 51 of file Macros.h.
◆ UNREAL_VERSION
| #define UNREAL_VERSION |
( |
| op, |
|
|
| ... ) |
Value:
#define VERSION_NUM(...)
Store a semantic version in an uint64 number.
#define UNREAL_VERSION_NUM
VERSION_NUM representation of current Engine version.
Macro for conveniently comparing unreal version for code compile compatibility cases.
Definition at line 108 of file Macros.h.
◆ UNREAL_VERSION_NUM
| #define UNREAL_VERSION_NUM VERSION_NUM(ENGINE_MAJOR_VERSION, ENGINE_MINOR_VERSION, ENGINE_PATCH_VERSION) |
VERSION_NUM representation of current Engine version.
Definition at line 105 of file Macros.h.
◆ VERSION_NUM
| #define VERSION_NUM |
( |
| ... | ) |
|
Value:
#define MACRO_OVERLOAD(prefix,...)
Implement preprocessor function overloading based on argument count for a set of macros following a d...
Store a semantic version in an uint64 number.
- Parameters
-
| major | 0xFFFF'0000'0000'0000ULL |
| minor | 0x0000'FFFF'0000'0000ULL |
| patch | 0x0000'0000'FFFF'0000ULL |
| rev | 0x0000'0000'0000'FFFFULL |
Definition at line 102 of file Macros.h.