![]() |
MCRO
C++23 utilities for Unreal Engine.
|
Use leading TEXT_ without parenthesis for Unreal compatible text literals.
More...
#include <string>#include "CoreMinimal.h"#include "Misc/EngineVersionComparison.h"#include "Internationalization/Internationalization.h"#include "Mcro/FunctionTraits.h"Go to the source code of this file.
Namespaces | |
| namespace | Mcro |
| namespace | Mcro::Text |
| Mixed text utilities and type traits. | |
| namespace | Mcro::Text::Macros |
| This namespace is used by MCRO text literal macros, don't use it directly! | |
Macros | |
| #define | UTF8TEXT_PASTE_ u8"" |
| #define | UTF16TEXT_PASTE_ u"" |
| #define | WIDETEXT_PASTE_ L"" |
| #define | UTF8TEXT_ UTF8TEXT_PASTE_ |
| #define | UTF16TEXT_ UTF16TEXT_PASTE_ |
| #define | WIDETEXT_ WIDETEXT_PASTE_ |
| #define | TEXT_PASTE_ WIDETEXT_ |
| #define | TEXT_ TEXT_PASTE_ |
A convenience alternative to Unreal's own TEXT macro but this one doesn't require parenthesis around the text literal, relying on string literal concatenation rules of C++. | |
| #define | LOCTEXT_(key) |
A convenience alternative to Unreal's own LOCTEXT macro but this one doesn't require parenthesis around the text literal. | |
| #define | NSLOCTEXT_(ns, key) |
A convenience alternative to Unreal's own NSLOCTEXT macro but this one doesn't require parenthesis around the text literal. | |
| #define | INVTEXT_ Mcro::Text::Macros::FInvTextFakeLiteralTag() % TEXT_ |
A convenience alternative to Unreal's own INVTEXT macro but this one doesn't require parenthesis around the text literal. | |
| #define | TEXTVIEW_ Mcro::Text::Macros::FStringViewFakeLiteralTag() % TEXT_ |
A convenience alternative to Unreal's own TEXTVIEW macro but this one doesn't require parenthesis around the text literal. | |
| #define | STDVIEW_ Mcro::Text::Macros::FStdStringLiteralTag() % TEXT_ |
A convenience alternative to Unreal's own TEXTVIEW macro but this one doesn't require parenthesis around the text literal and it returns an STL string view. | |
| #define | STRING_ Mcro::Text::Macros::FStringFakeLiteralTag() % TEXT_ |
| A convenience macro to allocate an FString directly. | |
| #define | NAME_ Mcro::Text::Macros::FNameFakeLiteralTag() % TEXT_ |
| A convenience macro to allocate an FName directly. | |
Functions | |
| FORCEINLINE FText | Mcro::Text::Macros::AsLocalizable_Advanced (const FTextKey &Namespace, const FTextKey &Key, const TCHAR *String) |
Use leading TEXT_ without parenthesis for Unreal compatible text literals.
Definition in file TextMacros.h.
| #define INVTEXT_ Mcro::Text::Macros::FInvTextFakeLiteralTag() % TEXT_ |
A convenience alternative to Unreal's own INVTEXT macro but this one doesn't require parenthesis around the text literal.
This operation allocates FText in runtime and an empty tag struct
Definition at line 156 of file TextMacros.h.
| #define LOCTEXT_ | ( | key | ) |
A convenience alternative to Unreal's own LOCTEXT macro but this one doesn't require parenthesis around the text literal.
This operation allocates an argument deferring struct and FText in runtime
Definition at line 136 of file TextMacros.h.
| #define NAME_ Mcro::Text::Macros::FNameFakeLiteralTag() % TEXT_ |
A convenience macro to allocate an FName directly.
This operation allocates FName in runtime and an empty tag struct. This is not a custom string literal because they're not available for concatenated groups of string literals of mixed encodings.
Definition at line 195 of file TextMacros.h.
| #define NSLOCTEXT_ | ( | ns, | |
| key ) |
A convenience alternative to Unreal's own NSLOCTEXT macro but this one doesn't require parenthesis around the text literal.
This operation allocates an argument deferring struct and FText in runtime
Definition at line 146 of file TextMacros.h.
| #define STDVIEW_ Mcro::Text::Macros::FStdStringLiteralTag() % TEXT_ |
A convenience alternative to Unreal's own TEXTVIEW macro but this one doesn't require parenthesis around the text literal and it returns an STL string view.
This operation creates a std::[w]string_view in consteval time. This is not a custom string literal because they're not available for concatenated groups of string literals of mixed encodings.
Definition at line 177 of file TextMacros.h.
| #define STRING_ Mcro::Text::Macros::FStringFakeLiteralTag() % TEXT_ |
A convenience macro to allocate an FString directly.
This operation allocates FString in runtime and an empty tag struct. This is not a custom string literal because they're not available for concatenated groups of string literals of mixed encodings.
Definition at line 186 of file TextMacros.h.
| #define TEXT_ TEXT_PASTE_ |
A convenience alternative to Unreal's own TEXT macro but this one doesn't require parenthesis around the text literal, relying on string literal concatenation rules of C++.
This operation is resolved entirely in compile time
Definition at line 53 of file TextMacros.h.
| #define TEXT_PASTE_ WIDETEXT_ |
Definition at line 43 of file TextMacros.h.
| #define TEXTVIEW_ Mcro::Text::Macros::FStringViewFakeLiteralTag() % TEXT_ |
A convenience alternative to Unreal's own TEXTVIEW macro but this one doesn't require parenthesis around the text literal.
This operation creates an FStringView in consteval time. This is not a custom string literal because they're not available for concatenated groups of string literals of mixed encodings.
Definition at line 167 of file TextMacros.h.
| #define UTF16TEXT_ UTF16TEXT_PASTE_ |
Definition at line 37 of file TextMacros.h.
| #define UTF16TEXT_PASTE_ u"" |
Definition at line 28 of file TextMacros.h.
| #define UTF8TEXT_ UTF8TEXT_PASTE_ |
Definition at line 36 of file TextMacros.h.
| #define UTF8TEXT_PASTE_ u8"" |
Definition at line 27 of file TextMacros.h.
| #define WIDETEXT_ WIDETEXT_PASTE_ |
Definition at line 38 of file TextMacros.h.
| #define WIDETEXT_PASTE_ L"" |
Definition at line 33 of file TextMacros.h.