I3DHVersion.h Source File

I3DHVersion.h Source File#

instant3Dhub: I3DHVersion.h Source File
instant3Dhub
I3DHVersion.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include "CoreMinimal.h"
9
10#include "Kismet/BlueprintFunctionLibrary.h"
11
12#include "I3DHVersion.generated.h"
13
20
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:
61 UFUNCTION(BlueprintPure, Category = "{instant3Dhub}|Version")
62 static int32 GetPluginVersionMajor();
63
68 UFUNCTION(BlueprintPure, Category = "{instant3Dhub}|Version")
69 static int32 GetPluginVersionMinor();
70
75 UFUNCTION(BlueprintPure, Category = "{instant3Dhub}|Version")
76 static int32 GetPluginVersionPatch();
77
82 UFUNCTION(BlueprintPure, Category = "{instant3Dhub}|Version")
84};
85
86// ----------------------------------------------------------
87// Version Comparison Macros
88// ----------------------------------------------------------
89// NOTE: Sourced from EngineVersionComparison.h
90
91// Helper for INSTANT3DHUB_VERSION_NEWER_THAN and INSTANT3DHUB_VERSION_OLDER_THAN
92#define INSTANT3DHUB_GREATER_SORT(Value, ValueToBeGreaterThan, TieBreaker) \
93 (((Value) > (ValueToBeGreaterThan)) || (((Value) == (ValueToBeGreaterThan)) && (TieBreaker)))
94
95// Helper for INSTANT3DHUB_VERSION_EQUALS
96#define INSTANT3DHUB_EQUAL_SORT(Value, ValueToBeEqualTo, TieBreaker) \
97 (((Value) == (ValueToBeEqualTo)) && (TieBreaker))
98
106#define INSTANT3DHUB_VERSION_NEWER_THAN(MajorVersion, MinorVersion, PatchVersion) \
107 INSTANT3DHUB_GREATER_SORT(INSTANT3DHUB_VERSION_MAJOR, MajorVersion, INSTANT3DHUB_GREATER_SORT(INSTANT3DHUB_VERSION_MINOR, MinorVersion, INSTANT3DHUB_GREATER_SORT(INSTANT3DHUB_VERSION_PATCH, PatchVersion, false)))
108
116#define INSTANT3DHUB_VERSION_OLDER_THAN(MajorVersion, MinorVersion, PatchVersion) \
117 INSTANT3DHUB_GREATER_SORT(MajorVersion, INSTANT3DHUB_VERSION_MAJOR, INSTANT3DHUB_GREATER_SORT(MinorVersion, INSTANT3DHUB_VERSION_MINOR, INSTANT3DHUB_GREATER_SORT(PatchVersion, INSTANT3DHUB_VERSION_PATCH, false)))
118
125#define INSTANT3DHUB_VERSION_EQUALS(MajorVersion, MinorVersion, PatchVersion) \
126 INSTANT3DHUB_EQUAL_SORT(MajorVersion, INSTANT3DHUB_VERSION_MAJOR, INSTANT3DHUB_EQUAL_SORT(MinorVersion, INSTANT3DHUB_VERSION_MINOR, INSTANT3DHUB_EQUAL_SORT(PatchVersion, INSTANT3DHUB_VERSION_PATCH, true)))
127
129
146
153#define INSTANT3DHUB_FEATURE_METADATA 1
154
159#define INSTANT3DHUB_FEATURE_DEBUG_METRICS 1
160
165#define INSTANT3DHUB_FEATURE_SUBMESH 1
166
174#define INSTANT3DHUB_FEATURE_SPACE_API 1
175
177
184
185// ----------------------------------------------------------
186// Deprecation
187// ----------------------------------------------------------
188// NOTE: For more info on how to use see description of UE_DEPRECATED Macro in CoreMiscDefines.h
189#if defined(__INTELLISENSE__)
190#define INSTANT3DHUB_DEPRECATED(Version, Message)
191#else
203#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.")]]
204#endif
205
206// ----------------------------------------------------------
207// Experimental
208// ----------------------------------------------------------
209
210#ifndef I3DH_VALIDATE_EXPERIMENTAL_API
226#define I3DH_VALIDATE_EXPERIMENTAL_API 1
227#endif
228
229// NOTE: For more info on how to use see description of UE_DEPRECATED Macro in CoreMiscDefines.h
230#if defined(__INTELLISENSE__) || !I3DH_VALIDATE_EXPERIMENTAL_API
231#define INSTANT3DHUB_EXPERIMENTAL(Version, Message)
232#else
246#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.")]]
247#endif
248
249// Suppresses the warning emitted by @ref INSTANT3DHUB_EXPERIMENTAL when plugin code uses one of its own
250// experimental APIs. Gated on the same I3DH_VALIDATE_EXPERIMENTAL_API switch as the marker so suppression
251// is active exactly when the warning is emitted.
252//
253// This is intentionally distinct from the engine's PRAGMA_DISABLE_EXPERIMENTAL_WARNINGS: the engine macro
254// is gated on UE_VALIDATE_EXPERIMENTAL_API (off by default) and from UE 5.6 on it overrides our fallback
255// below, so it does not suppress this plugin's [[deprecated]]-based experimental warning. Use these macros
256// for instant3Dhub-experimental symbols, and the engine macro for engine-experimental symbols.
257#if I3DH_VALIDATE_EXPERIMENTAL_API
258#define I3DH_PRAGMA_DISABLE_EXPERIMENTAL_WARNINGS PRAGMA_DISABLE_DEPRECATION_WARNINGS
259#define I3DH_PRAGMA_ENABLE_EXPERIMENTAL_WARNINGS PRAGMA_ENABLE_DEPRECATION_WARNINGS
260#else
261#define I3DH_PRAGMA_DISABLE_EXPERIMENTAL_WARNINGS
262#define I3DH_PRAGMA_ENABLE_EXPERIMENTAL_WARNINGS
263#endif
264
265// NOTE: These macros are also defined by Unreal Engine starting with version 5.6. We provide these
266// definitions as fallback for backwards compatibility, therefore they do not have an INSTANT3DHUB /
267// I3DH prefix.
268#ifndef PRAGMA_DISABLE_EXPERIMENTAL_WARNINGS
282#define PRAGMA_DISABLE_EXPERIMENTAL_WARNINGS PRAGMA_DISABLE_DEPRECATION_WARNINGS
283#endif
284
285#ifndef PRAGMA_ENABLE_EXPERIMENTAL_WARNINGS
299#define PRAGMA_ENABLE_EXPERIMENTAL_WARNINGS PRAGMA_ENABLE_DEPRECATION_WARNINGS
300#endif
301
Blueprint Functions to query the instant3Dhub Unreal Plugin Version.
Definition I3DHVersion.h:53
static int32 GetPluginVersionMajor()
Gets plugin version major.
static int32 GetPluginVersionPatch()
Gets plugin version patch.
static int32 GetPluginVersionMinor()
Gets plugin version minor.
static FString GetPluginVersionString()
Gets plugin version string.
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.