I3DHVersion.h Source File

instant3Dhub: I3DHVersion.h Source File
instant3Dhub
I3DHVersion.h
Go to the documentation of this file.
1
6#pragma once
7
8#include "CoreMinimal.h"
9
10#include "Kismet\BlueprintFunctionLibrary.h"
11
12#include "I3DHVersion.generated.h"
13
22namespace I3DHVersion
23{
28 INSTANT3DHUB_API int32 GetPluginVersionMajor();
29
34 INSTANT3DHUB_API int32 GetPluginVersionMinor();
35
40 INSTANT3DHUB_API int32 GetPluginVersionPatch();
41
46 INSTANT3DHUB_API FString GetPluginVersionString();
47
48} // namespace I3DHVersion
49
51UCLASS()
52class INSTANT3DHUB_API UI3DHVersion : public UBlueprintFunctionLibrary
53{
54 GENERATED_BODY()
55
56public:
57
62 UFUNCTION(BlueprintPure, Category = "{instant3Dhub}|Version")
63 static int32 GetPluginVersionMajor();
64
69 UFUNCTION(BlueprintPure, Category = "{instant3Dhub}|Version")
70 static int32 GetPluginVersionMinor();
71
76 UFUNCTION(BlueprintPure, Category = "{instant3Dhub}|Version")
77 static int32 GetPluginVersionPatch();
78
83 UFUNCTION(BlueprintPure, Category = "{instant3Dhub}|Version")
84 static FString GetPluginVersionString();
85};
86
87// ----------------------------------------------------------
88// Version Comparison Macros
89// ----------------------------------------------------------
90// NOTE: Sourced from EngineVersionComparison.h
91
92// Helper for INSTANT3DHUB_VERSION_NEWER_THAN and INSTANT3DHUB_VERSION_OLDER_THAN
93#define INSTANT3DHUB_GREATER_SORT(Value, ValueToBeGreaterThan, TieBreaker) \
94 (((Value) > (ValueToBeGreaterThan)) || (((Value) == (ValueToBeGreaterThan)) && (TieBreaker)))
95
96// Helper for INSTANT3DHUB_VERSION_EQUALS
97#define INSTANT3DHUB_EQUAL_SORT(Value, ValueToBeEqualTo, TieBreaker) \
98 (((Value) == (ValueToBeEqualTo)) && (TieBreaker))
99
107#define INSTANT3DHUB_VERSION_NEWER_THAN(MajorVersion, MinorVersion, PatchVersion) \
108 INSTANT3DHUB_GREATER_SORT(INSTANT3DHUB_VERSION_MAJOR, MajorVersion, INSTANT3DHUB_GREATER_SORT(INSTANT3DHUB_VERSION_MINOR, MinorVersion, INSTANT3DHUB_GREATER_SORT(INSTANT3DHUB_VERSION_PATCH, PatchVersion, false)))
109
117#define INSTANT3DHUB_VERSION_OLDER_THAN(MajorVersion, MinorVersion, PatchVersion) \
118 INSTANT3DHUB_GREATER_SORT(MajorVersion, INSTANT3DHUB_VERSION_MAJOR, INSTANT3DHUB_GREATER_SORT(MinorVersion, INSTANT3DHUB_VERSION_MINOR, INSTANT3DHUB_GREATER_SORT(PatchVersion, INSTANT3DHUB_VERSION_PATCH, false)))
119
126#define INSTANT3DHUB_VERSION_EQUALS(MajorVersion, MinorVersion, PatchVersion) \
127 INSTANT3DHUB_EQUAL_SORT(MajorVersion, INSTANT3DHUB_VERSION_MAJOR, INSTANT3DHUB_EQUAL_SORT(MinorVersion, INSTANT3DHUB_VERSION_MINOR, INSTANT3DHUB_EQUAL_SORT(PatchVersion, INSTANT3DHUB_VERSION_PATCH, true)))
128
154#define INSTANT3DHUB_FEATURE_METADATA 1
155
160#define INSTANT3DHUB_FEATURE_DEBUG_METRICS 1
161
171// ----------------------------------------------------------
172// Deprecation
173// ----------------------------------------------------------
174// NOTE: For more info on how to use see description of UE_DEPRECATED Macro in CoreMiscDefines.h
175#if defined (__INTELLISENSE__)
176#define INSTANT3DHUB_DEPRECATED(Version, Message)
177#else
189#define INSTANT3DHUB_DEPRECATED(Version, Message) [[deprecated(Message " - Please update your code to the new instant3Dhub API before upgrading to the next release, otherwise your project will no longer compile.")]]
190#endif
191
192// ----------------------------------------------------------
193// Experimental
194// ----------------------------------------------------------
195
196#ifndef I3DH_VALIDATE_EXPERIMENTAL_API
212#define I3DH_VALIDATE_EXPERIMENTAL_API 1
213#endif
214
215
216// NOTE: For more info on how to use see description of UE_DEPRECATED Macro in CoreMiscDefines.h
217#if defined (__INTELLISENSE__) || !I3DH_VALIDATE_EXPERIMENTAL_API
218#define INSTANT3DHUB_EXPERIMENTAL(Version, Message)
219#else
233#define INSTANT3DHUB_EXPERIMENTAL(Version, Message) [[deprecated(Message " - This API is experimental. As such, there is no guarantee that it won't change or be removed in future releases. Please use at your own risk.")]]
234#endif
235
236
237
238// NOTE: These macros are also defined by Unreal Engine starting with version 5.6. We provide these
239// definitions as fallback for backwards compatibility, therefore they do not have an INSTANT3DHUB /
240// I3DH prefix.
241#ifndef PRAGMA_DISABLE_EXPERIMENTAL_WARNINGS
255#define PRAGMA_DISABLE_EXPERIMENTAL_WARNINGS PRAGMA_DISABLE_DEPRECATION_WARNINGS
256#endif
257
258#ifndef PRAGMA_ENABLE_EXPERIMENTAL_WARNINGS
272#define PRAGMA_ENABLE_EXPERIMENTAL_WARNINGS PRAGMA_ENABLE_DEPRECATION_WARNINGS
273#endif
274
Blueprint Functions to query the instant3Dhub Unreal Plugin Version.
Definition I3DHVersion.h:53
Namespace offering functions to query the instant3Dhub Unreal Plugin version.
Definition I3DHVersion.h:23
FString GetPluginVersionString()
Gets plugin version string.
int32 GetPluginVersionPatch()
Gets plugin version patch.
int32 GetPluginVersionMajor()
Gets plugin version major.
int32 GetPluginVersionMinor()
Gets plugin version minor.