UnrealVoxta 0.1.1
 
Loading...
Searching...
No Matches
VoxtaDefines.h
Go to the documentation of this file.
1// Copyright(c) 2024 grrimgrriefer & DZnnah, see LICENSE for details.
2
3#pragma once
4#include "Logging/LogMacros.h"
5#include "type_traits"
6
7class FSignalRValue;
8class UTexture2DDynamic;
9
11#define EASY_NAME(x) FName(TEXT(x))
13#define EASY_STRING(x) FString(TEXT(x))
15#define SIGNALR_STRING(x) FSignalRValue(FString(TEXT(x)))
17#define SIGNALR_STRINGVIEW(x) ConvertToSignalRValue(x)
18
19#define TARGETED_SERVER_VERSION TEXT("1.0.0-beta.147")
20#define TARGETED_API_VERSION TEXT("2025-01")
21
23template <typename T, typename = std::enable_if_t<std::is_convertible_v<T, FStringView>>>
25{
26 static_assert(std::is_same<std::decay_t<T>, FStringView>::value, "SIGNALR_STRINGVIEW macro can only be used with "
27 "FStringView. Please use SIGNALR_STRING for regular string literals");
28 return FSignalRValue(FString(value));
29}
30
31VOXTADATA_API DECLARE_LOG_CATEGORY_EXTERN(VoxtaLog, Log, All);
32
33static const FString VOXTA_CONTEXT_KEY = FString("UnrealVoxta - SimpleChat");
34static const FString EMPTY_STRING = FString(TEXT(""));
35
36DECLARE_DELEGATE_ThreeParams(FDownloadedTextureDelegateNative, bool, const UTexture2DDynamic*, const FIntVector2&);
37
39VOXTADATA_API FString GuidToString(const FGuid& input);
VOXTADATA_API DECLARE_LOG_CATEGORY_EXTERN(VoxtaLog, Log, All)
DECLARE_DELEGATE_ThreeParams(FDownloadedTextureDelegateNative, bool, const UTexture2DDynamic *, const FIntVector2 &)
VOXTADATA_API FString GuidToString(const FGuid &input)
Helper function to convert FGuid value to a string (forced DigitsWithHyphensLower)
Definition VoxtaDefines.cpp:5
FSignalRValue ConvertToSignalRValue(const T &value)
Helper function for SIGNALR_STRINGVIEW macro.
Definition VoxtaDefines.h:24
Represents a value that can be sent to or received from a SignalR hub.
Definition SignalRValue.h:34