重命名为 RedNetwork

This commit is contained in:
_Redstone_c_ 2021-01-05 19:48:45 +08:00
parent d68d6eeec0
commit 859db61f9c
15 changed files with 119 additions and 119 deletions

View File

@ -1,29 +0,0 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.0",
"FriendlyName": "[RSHW] Network",
"Description": "",
"Category": "RSHW",
"CreatedBy": "_Redstone_c_",
"CreatedByURL": "",
"DocsURL": "",
"MarketplaceURL": "",
"SupportURL": "",
"CanContainContent": true,
"IsBetaVersion": false,
"IsExperimentalVersion": false,
"Installed": false,
"Modules": [
{
"Name": "RSHWNetwork",
"Type": "Runtime",
"LoadingPhase": "Default"
},
{
"Name": "KCP",
"Type": "Runtime",
"LoadingPhase": "Default"
}
]
}

29
RedNetwork.uplugin Normal file
View File

@ -0,0 +1,29 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.0",
"FriendlyName": "Red Network",
"Description": "",
"Category": "Networking",
"CreatedBy": "_Redstone_c_",
"CreatedByURL": "",
"DocsURL": "",
"MarketplaceURL": "",
"SupportURL": "",
"CanContainContent": false,
"IsBetaVersion": false,
"IsExperimentalVersion": false,
"Installed": false,
"Modules": [
{
"Name": "RedNetwork",
"Type": "Runtime",
"LoadingPhase": "Default"
},
{
"Name": "KCP",
"Type": "Runtime",
"LoadingPhase": "Default"
}
]
}

View File

@ -1,3 +0,0 @@
#include "Logging.h"
DEFINE_LOG_CATEGORY(LogRSHWNetwork);

View File

@ -1 +0,0 @@
#include "RSHWNetworkType.h"

View File

@ -0,0 +1,3 @@
#include "Logging.h"
DEFINE_LOG_CATEGORY(LogRedNetwork);

View File

@ -3,4 +3,4 @@
#include "CoreMinimal.h"
#include "Modules/ModuleManager.h"
DECLARE_LOG_CATEGORY_EXTERN(LogRSHWNetwork, Log, All);
DECLARE_LOG_CATEGORY_EXTERN(LogRedNetwork, Log, All);

View File

@ -1,15 +1,15 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#include "RSHWNetwork.h"
#include "RedNetwork.h"
#define LOCTEXT_NAMESPACE "FRSHWNetworkModule"
#define LOCTEXT_NAMESPACE "FRedNetworkModule"
void FRSHWNetworkModule::StartupModule()
void FRedNetworkModule::StartupModule()
{
// This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
}
void FRSHWNetworkModule::ShutdownModule()
void FRedNetworkModule::ShutdownModule()
{
// This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
// we call this function before unloading the module.
@ -17,4 +17,4 @@ void FRSHWNetworkModule::ShutdownModule()
#undef LOCTEXT_NAMESPACE
IMPLEMENT_MODULE(FRSHWNetworkModule, RSHWNetwork)
IMPLEMENT_MODULE(FRedNetworkModule, RedNetwork)

View File

@ -1,4 +1,4 @@
#include "RSHWNetworkClient.h"
#include "RedNetworkClient.h"
#include "KCPWrap.h"
#include "Logging.h"
@ -6,14 +6,14 @@
#include "IPAddress.h"
#include "SocketSubsystem.h"
bool URSHWNetworkClient::Send(const TArray<uint8>& Data)
bool URedNetworkClient::Send(const TArray<uint8>& Data)
{
if (!IsActive() || !(ClientPass.ID | ClientPass.Key)) return false;
return KCPUnit->Send(Data.GetData(), Data.Num());
}
int32 URSHWNetworkClient::UDPSend(const uint8 * Data, int32 Count)
int32 URedNetworkClient::UDPSend(const uint8 * Data, int32 Count)
{
if (!IsActive() || !(ClientPass.ID | ClientPass.Key)) return false;
@ -36,7 +36,7 @@ int32 URSHWNetworkClient::UDPSend(const uint8 * Data, int32 Count)
return 0;
}
void URSHWNetworkClient::Tick(float DeltaTime)
void URedNetworkClient::Tick(float DeltaTime)
{
if (!IsActive()) return;
@ -91,7 +91,7 @@ void URSHWNetworkClient::Tick(float DeltaTime)
if (BytesRead < 8) continue;
RecvBuffer.SetNumUninitialized(BytesRead, false);
FRSHWNetworkPass SourcePass;
FRedNetworkPass SourcePass;
SourcePass.ID = 0;
SourcePass.Key = 0;
@ -167,14 +167,14 @@ void URSHWNetworkClient::Tick(float DeltaTime)
KCPUnit = nullptr;
UE_LOG(LogRSHWNetwork, Warning, TEXT("RSHW Network Client timeout."));
UE_LOG(LogRedNetwork, Warning, TEXT("Red Network Client timeout."));
OnUnlogin.Broadcast();
}
}
}
void URSHWNetworkClient::Activate(bool bReset)
void URedNetworkClient::Activate(bool bReset)
{
if (bReset) Deactivate();
if (bIsActive) return;
@ -183,7 +183,7 @@ void URSHWNetworkClient::Activate(bool bReset)
if (SocketSubsystem == nullptr)
{
UE_LOG(LogRSHWNetwork, Error, TEXT("Socket subsystem is nullptr."));
UE_LOG(LogRedNetwork, Error, TEXT("Socket subsystem is nullptr."));
return;
}
@ -195,22 +195,22 @@ void URSHWNetworkClient::Activate(bool bReset)
if (!bIsValid)
{
UE_LOG(LogRSHWNetwork, Error, TEXT("Server addr invalid."));
UE_LOG(LogRedNetwork, Error, TEXT("Server addr invalid."));
ServerAddrPtr = nullptr;
return;
}
SocketPtr = SocketSubsystem->CreateSocket(NAME_DGram, TEXT("RSHW Client Socket"));
SocketPtr = SocketSubsystem->CreateSocket(NAME_DGram, TEXT("Red Client Socket"));
if (SocketPtr == nullptr)
{
UE_LOG(LogRSHWNetwork, Error, TEXT("Socket creation failed."));
UE_LOG(LogRedNetwork, Error, TEXT("Socket creation failed."));
return;
}
if (!SocketPtr->SetNonBlocking())
{
UE_LOG(LogRSHWNetwork, Error, TEXT("Socket set non-blocking failed."));
UE_LOG(LogRedNetwork, Error, TEXT("Socket set non-blocking failed."));
SocketSubsystem->DestroySocket(SocketPtr);
return;
}
@ -219,12 +219,12 @@ void URSHWNetworkClient::Activate(bool bReset)
ClientPass.Key = 0;
LastRecvTime = FDateTime::Now();
LastHeartbeat = FDateTime::MinValue();
UE_LOG(LogRSHWNetwork, Log, TEXT("RSHW Network Client activate."));
UE_LOG(LogRedNetwork, Log, TEXT("Red Network Client activate."));
bIsActive = true;
}
void URSHWNetworkClient::Deactivate()
void URedNetworkClient::Deactivate()
{
if (!bIsActive) return;
@ -246,12 +246,12 @@ void URSHWNetworkClient::Deactivate()
KCPUnit = nullptr;
UE_LOG(LogRSHWNetwork, Log, TEXT("RSHW Network Client deactivate."));
UE_LOG(LogRedNetwork, Log, TEXT("Red Network Client deactivate."));
bIsActive = false;
}
void URSHWNetworkClient::BeginDestroy()
void URedNetworkClient::BeginDestroy()
{
Deactivate();

View File

@ -1,4 +1,4 @@
#include "RSHWNetworkServer.h"
#include "RedNetworkServer.h"
#include "KCPWrap.h"
#include "Logging.h"
@ -7,7 +7,7 @@
#include "SocketSubsystem.h"
#include "HAL/UnrealMemory.h"
bool URSHWNetworkServer::Send(int32 ClientID, const TArray<uint8>& Data)
bool URedNetworkServer::Send(int32 ClientID, const TArray<uint8>& Data)
{
if (!IsActive() || !Registration.Contains(ClientID)) return false;
@ -16,7 +16,7 @@ bool URSHWNetworkServer::Send(int32 ClientID, const TArray<uint8>& Data)
return !Info.KCPUnit->Send(Data.GetData(), Data.Num());
}
int32 URSHWNetworkServer::UDPSend(int32 ClientID, const uint8* Data, int32 Count)
int32 URedNetworkServer::UDPSend(int32 ClientID, const uint8* Data, int32 Count)
{
if (!IsActive() || !Registration.Contains(ClientID)) return false;
@ -41,7 +41,7 @@ int32 URSHWNetworkServer::UDPSend(int32 ClientID, const uint8* Data, int32 Count
return 0;
}
void URSHWNetworkServer::Tick(float DeltaTime)
void URedNetworkServer::Tick(float DeltaTime)
{
if (!IsActive()) return;
@ -107,7 +107,7 @@ void URSHWNetworkServer::Tick(float DeltaTime)
if (BytesRead < 8) continue;
RecvBuffer.SetNumUninitialized(BytesRead, false);
FRSHWNetworkPass SourcePass;
FRedNetworkPass SourcePass;
SourcePass.ID = 0;
SourcePass.Key = 0;
@ -138,10 +138,10 @@ void URSHWNetworkServer::Tick(float DeltaTime)
PreRegistration.Add(SourceAddrStr, NewRegistration);
UE_LOG(LogRSHWNetwork, Log, TEXT("Pre-register pass %i from %s."), NewRegistration.Pass.ID, *SourceAddrStr);
UE_LOG(LogRedNetwork, Log, TEXT("Pre-register pass %i from %s."), NewRegistration.Pass.ID, *SourceAddrStr);
}
const FRSHWNetworkPass& Pass = PreRegistration[SourceAddrStr].Pass;
const FRedNetworkPass& Pass = PreRegistration[SourceAddrStr].Pass;
SendBuffer.SetNum(8, false);
@ -158,7 +158,7 @@ void URSHWNetworkServer::Tick(float DeltaTime)
int32 BytesSend;
if (SocketPtr->SendTo(SendBuffer.GetData(), SendBuffer.Num(), BytesSend, *SourceAddr) && BytesSend == SendBuffer.Num())
{
UE_LOG(LogRSHWNetwork, Log, TEXT("Send pre-registration pass %i to %s."), Pass.ID, *SourceAddrStr);
UE_LOG(LogRedNetwork, Log, TEXT("Send pre-registration pass %i to %s."), Pass.ID, *SourceAddrStr);
}
}
else
@ -170,7 +170,7 @@ void URSHWNetworkServer::Tick(float DeltaTime)
{
Registration[SourcePass.ID].Addr = SourceAddr;
UE_LOG(LogRSHWNetwork, Log, TEXT("Redirect connection %i."), SourcePass.ID);
UE_LOG(LogRedNetwork, Log, TEXT("Redirect connection %i."), SourcePass.ID);
}
}
@ -207,7 +207,7 @@ void URSHWNetworkServer::Tick(float DeltaTime)
PreRegistration.Remove(SourceAddrStr);
UE_LOG(LogRSHWNetwork, Log, TEXT("Register connection %i."), SourcePass.ID);
UE_LOG(LogRedNetwork, Log, TEXT("Register connection %i."), SourcePass.ID);
OnLogin.Broadcast(SourcePass.ID);
}
@ -239,7 +239,7 @@ void URSHWNetworkServer::Tick(float DeltaTime)
{
if (NowTime - PreRegistration[Addr].Time > TimeoutLimit)
{
UE_LOG(LogRSHWNetwork, Log, TEXT("Pre-registration pass %i timeout."), PreRegistration[Addr].Pass.ID);
UE_LOG(LogRedNetwork, Log, TEXT("Pre-registration pass %i timeout."), PreRegistration[Addr].Pass.ID);
PreRegistration.Remove(Addr);
}
@ -255,7 +255,7 @@ void URSHWNetworkServer::Tick(float DeltaTime)
{
if (NowTime - Registration[ID].RecvTime > TimeoutLimit)
{
UE_LOG(LogRSHWNetwork, Log, TEXT("Registration connection %i timeout."), Registration[ID].Pass.ID);
UE_LOG(LogRedNetwork, Log, TEXT("Registration connection %i timeout."), Registration[ID].Pass.ID);
Registration.Remove(ID);
@ -291,7 +291,7 @@ void URSHWNetworkServer::Tick(float DeltaTime)
}
}
void URSHWNetworkServer::Activate(bool bReset)
void URedNetworkServer::Activate(bool bReset)
{
if (bReset) Deactivate();
if (bIsActive) return;
@ -300,15 +300,15 @@ void URSHWNetworkServer::Activate(bool bReset)
if (SocketSubsystem == nullptr)
{
UE_LOG(LogRSHWNetwork, Error, TEXT("Socket subsystem is nullptr."));
UE_LOG(LogRedNetwork, Error, TEXT("Socket subsystem is nullptr."));
return;
}
SocketPtr = SocketSubsystem->CreateSocket(NAME_DGram, TEXT("RSHW Server Socket"));
SocketPtr = SocketSubsystem->CreateSocket(NAME_DGram, TEXT("Red Server Socket"));
if (SocketPtr == nullptr)
{
UE_LOG(LogRSHWNetwork, Error, TEXT("Socket creation failed."));
UE_LOG(LogRedNetwork, Error, TEXT("Socket creation failed."));
return;
}
@ -319,26 +319,26 @@ void URSHWNetworkServer::Activate(bool bReset)
if (!SocketPtr->Bind(*ServerAddr))
{
UE_LOG(LogRSHWNetwork, Error, TEXT("Socket bind failed."));
UE_LOG(LogRedNetwork, Error, TEXT("Socket bind failed."));
SocketSubsystem->DestroySocket(SocketPtr);
return;
}
if (!SocketPtr->SetNonBlocking())
{
UE_LOG(LogRSHWNetwork, Error, TEXT("Socket set non-blocking failed."));
UE_LOG(LogRedNetwork, Error, TEXT("Socket set non-blocking failed."));
SocketSubsystem->DestroySocket(SocketPtr);
return;
}
NextRegistrationID = 1;
UE_LOG(LogRSHWNetwork, Log, TEXT("RSHW Network Server activate."));
UE_LOG(LogRedNetwork, Log, TEXT("Red Network Server activate."));
bIsActive = true;
}
void URSHWNetworkServer::Deactivate()
void URedNetworkServer::Deactivate()
{
if (!bIsActive) return;
@ -361,12 +361,12 @@ void URSHWNetworkServer::Deactivate()
PreRegistration.Reset();
Registration.Reset();
UE_LOG(LogRSHWNetwork, Log, TEXT("RSHW Network Server deactivate."));
UE_LOG(LogRedNetwork, Log, TEXT("Red Network Server deactivate."));
bIsActive = false;
}
void URSHWNetworkServer::BeginDestroy()
void URedNetworkServer::BeginDestroy()
{
Deactivate();

View File

@ -0,0 +1 @@
#include "RedNetworkType.h"

View File

@ -5,7 +5,7 @@
#include "CoreMinimal.h"
#include "Modules/ModuleManager.h"
class FRSHWNetworkModule : public IModuleInterface
class FRedNetworkModule : public IModuleInterface
{
public:

View File

@ -3,63 +3,63 @@
#include "CoreMinimal.h"
#include "Misc/DateTime.h"
#include "UObject/Object.h"
#include "RSHWNetworkType.h"
#include "RSHWNetworkClient.generated.h"
#include "RedNetworkType.h"
#include "RedNetworkClient.generated.h"
class FKCPWrap;
class FInternetAddr;
UCLASS(BlueprintType)
class RSHWNETWORK_API URSHWNetworkClient : public UObject, public FTickableGameObject
class REDNETWORK_API URedNetworkClient : public UObject, public FTickableGameObject
{
GENERATED_BODY()
public:
DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE(FLoginSignature, URSHWNetworkClient, OnLogin);
DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_OneParam(FRecvSignature, URSHWNetworkClient, OnRecv, const TArray<uint8>&, Data);
DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE(FUnloginSignature, URSHWNetworkClient, OnUnlogin);
DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE(FLoginSignature, URedNetworkClient, OnLogin);
DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_OneParam(FRecvSignature, URedNetworkClient, OnRecv, const TArray<uint8>&, Data);
DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE(FUnloginSignature, URedNetworkClient, OnUnlogin);
public:
UPROPERTY(BlueprintAssignable, Category = "RSHW|Network")
UPROPERTY(BlueprintAssignable, Category = "Red|Network")
FLoginSignature OnLogin;
UPROPERTY(BlueprintAssignable, Category = "RSHW|Network")
UPROPERTY(BlueprintAssignable, Category = "Red|Network")
FRecvSignature OnRecv;
UPROPERTY(BlueprintAssignable, Category = "RSHW|Network")
UPROPERTY(BlueprintAssignable, Category = "Red|Network")
FUnloginSignature OnUnlogin;
public:
UFUNCTION(BlueprintCallable, Category = "RSHW|Network")
UFUNCTION(BlueprintCallable, Category = "Red|Network")
bool IsActive() const { return bIsActive; }
UFUNCTION(BlueprintCallable, Category = "RSHW|Network")
UFUNCTION(BlueprintCallable, Category = "Red|Network")
void Activate(bool bReset = false);
UFUNCTION(BlueprintCallable, Category = "RSHW|Network")
UFUNCTION(BlueprintCallable, Category = "Red|Network")
void Deactivate();
UFUNCTION(BlueprintCallable, Category = "RSHW|Network")
UFUNCTION(BlueprintCallable, Category = "Red|Network")
bool IsLogged() const { return ClientPass.ID | ClientPass.Key; }
UFUNCTION(BlueprintCallable, Category = "RSHW|Network")
UFUNCTION(BlueprintCallable, Category = "Red|Network")
bool Send(const TArray<uint8>& Data);
public:
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "RSHW|Network")
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Red|Network")
FString ServerAddr = TEXT("127.0.0.1:25565");
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "RSHW|Network")
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Red|Network")
FTimespan Heartbeat = FTimespan::FromSeconds(1.0);
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "RSHW|Network")
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Red|Network")
FTimespan TimeoutLimit = FTimespan::FromSeconds(8.0);
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "RSHW|Network")
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Red|Network")
int32 KCPLogMask = 0;
private:
@ -74,7 +74,7 @@ private:
TArray<uint8> RecvBuffer;
TArray<uint8> DataBuffer;
FRSHWNetworkPass ClientPass;
FRedNetworkPass ClientPass;
FDateTime LastRecvTime;
FDateTime LastHeartbeat;

View File

@ -3,60 +3,60 @@
#include "CoreMinimal.h"
#include "Misc/DateTime.h"
#include "UObject/Object.h"
#include "RSHWNetworkType.h"
#include "RSHWNetworkServer.generated.h"
#include "RedNetworkType.h"
#include "RedNetworkServer.generated.h"
class FSocket;
class FKCPWrap;
UCLASS(BlueprintType)
class RSHWNETWORK_API URSHWNetworkServer : public UObject, public FTickableGameObject
class REDNETWORK_API URedNetworkServer : public UObject, public FTickableGameObject
{
GENERATED_BODY()
public:
DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_OneParam(FLoginSignature, URSHWNetworkServer, OnLogin, int32, ClientID);
DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_TwoParams(FRecvSignature, URSHWNetworkServer, OnRecv, int32, ClientID, const TArray<uint8>&, Data);
DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_OneParam(FUnloginSignature, URSHWNetworkServer, OnUnlogin, int32, ClientID);
DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_OneParam(FLoginSignature, URedNetworkServer, OnLogin, int32, ClientID);
DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_TwoParams(FRecvSignature, URedNetworkServer, OnRecv, int32, ClientID, const TArray<uint8>&, Data);
DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_OneParam(FUnloginSignature, URedNetworkServer, OnUnlogin, int32, ClientID);
public:
UPROPERTY(BlueprintAssignable, Category = "RSHW|Network")
UPROPERTY(BlueprintAssignable, Category = "Red|Network")
FLoginSignature OnLogin;
UPROPERTY(BlueprintAssignable, Category = "RSHW|Network")
UPROPERTY(BlueprintAssignable, Category = "Red|Network")
FRecvSignature OnRecv;
UPROPERTY(BlueprintAssignable, Category = "RSHW|Network")
UPROPERTY(BlueprintAssignable, Category = "Red|Network")
FUnloginSignature OnUnlogin;
public:
UFUNCTION(BlueprintCallable, Category = "RSHW|Network")
UFUNCTION(BlueprintCallable, Category = "Red|Network")
bool IsActive() const { return bIsActive; }
UFUNCTION(BlueprintCallable, Category = "RSHW|Network")
UFUNCTION(BlueprintCallable, Category = "Red|Network")
void Activate(bool bReset = false);
UFUNCTION(BlueprintCallable, Category = "RSHW|Network")
UFUNCTION(BlueprintCallable, Category = "Red|Network")
void Deactivate();
UFUNCTION(BlueprintCallable, Category = "RSHW|Network")
UFUNCTION(BlueprintCallable, Category = "Red|Network")
bool Send(int32 ClientID, const TArray<uint8>& Data);
public:
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "RSHW|Network")
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Red|Network")
int32 Port = 25565;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "RSHW|Network")
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Red|Network")
FTimespan Heartbeat = FTimespan::FromSeconds(1.0);
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "RSHW|Network")
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Red|Network")
FTimespan TimeoutLimit = FTimespan::FromSeconds(8.0);
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "RSHW|Network")
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Red|Network")
int32 KCPLogMask = 0;
private:
@ -74,14 +74,14 @@ private:
struct FPreRegistrationInfo
{
FDateTime Time;
FRSHWNetworkPass Pass;
FRedNetworkPass Pass;
};
TMap<FString, FPreRegistrationInfo> PreRegistration;
struct FRegistrationInfo
{
FRSHWNetworkPass Pass;
FRedNetworkPass Pass;
FDateTime RecvTime;
FDateTime Heartbeat;
TSharedPtr<FInternetAddr> Addr;

View File

@ -2,7 +2,7 @@
#include "CoreMinimal.h"
struct FRSHWNetworkPass
struct REDNETWORK_API FRedNetworkPass
{
int32 ID;
int32 Key;

View File

@ -2,9 +2,9 @@
using UnrealBuildTool;
public class RSHWNetwork : ModuleRules
public class RedNetwork : ModuleRules
{
public RSHWNetwork(ReadOnlyTargetRules Target) : base(Target)
public RedNetwork(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;