MetaSoul

Loading...
Searching...
No Matches
EmoShapeSubSystem.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Modules/ModuleManager.h"
7
8 class FEmoShapeIONative;
9 DECLARE_LOG_CATEGORY_EXTERN(LogEmoShape, Log, All);
10
11
12 class FESIONative;
13
14 class FEmoShapeSubSystemModule : public IModuleInterface
15{
16 public:
17
19 virtual void StartupModule() override;
20 virtual void ShutdownModule() override;
21
22 static inline FEmoShapeSubSystemModule& Get()
23 {
24 return FModuleManager::LoadModuleChecked< FEmoShapeSubSystemModule >("EmoShapeSubSystem");
25 }
26
27 TSharedPtr<FESIONative> NewValidNativePointer(const bool bShouldUseTlsLibraries = false, const bool bShouldSkipCertificateVerification = true);
28 TSharedPtr<FESIONative> ValidSharedNativePointer(FString SharedId, const bool bShouldUseTlsLibraries, const bool bShouldSkipCertificateVerification);
29 void ReleaseNativePointer(TSharedPtr<FESIONative> PointerToRelease);
30
31 private:
32
33 FCriticalSection DeleteSection;
34
35 //All native pointers manages by the plugin
36 TArray<TSharedPtr<FESIONative>> PluginNativePointers;
37
38 //Shared pointers, these will typically be alive past game world lifecycles
39 TMap<FString, TSharedPtr<FESIONative>> SharedNativePointers;
40 TSet<TSharedPtr<FESIONative>> AllSharedPtrs; //reverse lookup
41
42 FThreadSafeBool bHasActiveNativePointers;
43};
DECLARE_LOG_CATEGORY_EXTERN
DECLARE_LOG_CATEGORY_EXTERN(LogEmoShape, Log, All)
FESIONative
Definition ESIONative.h:39
FEmoShapeSubSystemModule
Definition EmoShapeSubSystem.h:15
FEmoShapeSubSystemModule::Get
static FEmoShapeSubSystemModule & Get()
Definition EmoShapeSubSystem.h:22
FEmoShapeSubSystemModule::ValidSharedNativePointer
TSharedPtr< FESIONative > ValidSharedNativePointer(FString SharedId, const bool bShouldUseTlsLibraries, const bool bShouldSkipCertificateVerification)
Definition EmoShapeSubSystem.cpp:60
FEmoShapeSubSystemModule::ReleaseNativePointer
void ReleaseNativePointer(TSharedPtr< FESIONative > PointerToRelease)
Definition EmoShapeSubSystem.cpp:78
FEmoShapeSubSystemModule::NewValidNativePointer
TSharedPtr< FESIONative > NewValidNativePointer(const bool bShouldUseTlsLibraries=false, const bool bShouldSkipCertificateVerification=true)
Definition EmoShapeSubSystem.cpp:48
FEmoShapeSubSystemModule::ShutdownModule
virtual void ShutdownModule() override
Definition EmoShapeSubSystem.cpp:17
FEmoShapeSubSystemModule::StartupModule
virtual void StartupModule() override
Definition EmoShapeSubSystem.cpp:12