Skip to content

Commit

Permalink
moved wrapper classes to separate module
Browse files Browse the repository at this point in the history
  • Loading branch information
pasotee committed May 15, 2024
1 parent f9ca35d commit 437ba49
Show file tree
Hide file tree
Showing 19 changed files with 64 additions and 76 deletions.
1 change: 1 addition & 0 deletions Source/ConfigCat/ConfigCat.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public ConfigCat(ReadOnlyTargetRules Target) : base(Target)

PrivateDependencyModuleNames.AddRange(new[]
{
"ConfigCatWrappers",
"ConfigCatCppSdk"
});

Expand Down
8 changes: 4 additions & 4 deletions Source/ConfigCat/Private/ConfigCatSubsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
#include "ConfigCatLogger.h"
#include "ConfigCatNetworkAdapter.h"
#include "ConfigCatSettings.h"
#include "Wrappers/ConfigCatSettingsWrapper.h"
#include "Wrappers/ConfigCatEvaluationWrapper.h"
#include "Wrappers/ConfigCatUserWrapper.h"
#include "Wrappers/ConfigCatValueWrapper.h"
#include "ConfigCatSettingsWrapper.h"
#include "ConfigCatEvaluationWrapper.h"
#include "ConfigCatUserWrapper.h"
#include "ConfigCatValueWrapper.h"

using namespace configcat;

Expand Down
38 changes: 18 additions & 20 deletions Source/ConfigCatWrappers/ConfigCatWrappers.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,23 @@

public class ConfigCatWrappers : ModuleRules
{
public ConfigCatWrappers(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
public ConfigCatWrappers(ReadOnlyTargetRules Target) : base(Target)
{
PublicDependencyModuleNames.AddRange(new[]
{
"Core",
"CoreUObject",
"DeveloperSettings",
"Projects",
"Engine",
"HTTP"
});

PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);

PrivateDependencyModuleNames.AddRange(
new string[]
{
"CoreUObject",
"Engine",
"Slate",
"SlateCore"
}
);
}
PrivateDependencyModuleNames.AddRange(new[]
{
"ConfigCatCppSdk"
});

PrivateIncludePaths.Add("ThirdParty");
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// Fill out your copyright notice in the Description page of Project Settings.

#include "Wrappers/ConfigCatEvaluationWrapper.h"
#include "ConfigCatEvaluationWrapper.h"

#include "ConfigCatCppSDK/Include/log.h"
#include "Wrappers/ConfigCatPercentageOptionWrapper.h"
#include "Wrapper/ConfigCatTargetingRuleWrapper.h"
#include "Wrappers/ConfigCatUserWrapper.h"
#include "Wrappers/ConfigCatValueWrapper.h"

#include "ConfigCatPercentageOptionWrapper.h"
#include "ConfigCatTargetingRuleWrapper.h"
#include "ConfigCatUserWrapper.h"
#include "ConfigCatValueWrapper.h"

UConfigCatEvaluationWrapper* UConfigCatEvaluationWrapper::CreateEvaluation(const configcat::EvaluationDetailsBase& InEvaluationDetails)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) ConfigCat 2024. All Rights Reserved.

#include "Wrappers/ConfigCatPercentageOptionWrapper.h"
#include "ConfigCatPercentageOptionWrapper.h"

#include "Wrappers/ConfigCatValueWrapper.h"
#include "ConfigCatValueWrapper.h"

UConfigCatPercentageOptionWrapper* UConfigCatPercentageOptionWrapper::CreatePercentageOption(const configcat::PercentageOption& InPercentageOption)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) ConfigCat 2024. All Rights Reserved.

#include "Wrappers/ConfigCatSettingValueContainerWrapper.h"
#include "ConfigCatSettingValueContainerWrapper.h"

#include "Wrappers/ConfigCatValueWrapper.h"
#include "ConfigCatValueWrapper.h"

UConfigCatSettingValueContainerWrapper* UConfigCatSettingValueContainerWrapper::CreateSettingValue(const configcat::SettingValueContainer& SettingValueContainer)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Fill out your copyright notice in the Description page of Project Settings.

#include "Wrappers/ConfigCatSettingsWrapper.h"
#include "ConfigCatSettingsWrapper.h"

#include "Wrappers/ConfigCatPercentageOptionWrapper.h"
#include "Wrapper/ConfigCatTargetingRuleWrapper.h"
#include "Wrappers/ConfigCatValueWrapper.h"
#include "ConfigCatPercentageOptionWrapper.h"
#include "ConfigCatTargetingRuleWrapper.h"
#include "ConfigCatValueWrapper.h"

using namespace configcat;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// Copyright (c) ConfigCat 2024. All Rights Reserved.

#include "Wrapper/ConfigCatTargetingRuleWrapper.h"

#include "Wrappers/ConfigCatSettingValueContainerWrapper.h"
#include "Wrappers/ConfigCatPercentageOptionWrapper.h"
#include "Wrappers/ConfigCatValueWrapper.h"
#include "ConfigCatTargetingRuleWrapper.h"

#include "ConfigCatSettingValueContainerWrapper.h"
#include "ConfigCatPercentageOptionWrapper.h"
#include "ConfigCatValueWrapper.h"

UConfigCatUserConditionWrapper* UConfigCatUserConditionWrapper::CreateUserCondition(const configcat::UserCondition& InUserCondition)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) ConfigCat 2024. All Rights Reserved.

#include "Wrappers/ConfigCatUserWrapper.h"
#include "ConfigCatUserWrapper.h"

#include <ConfigCatCppSDK/Include/configcatuser.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) ConfigCat 2024. All Rights Reserved.

#include "Wrappers/ConfigCatValueWrapper.h"
#include "ConfigCatValueWrapper.h"

UConfigCatValueWrapper* UConfigCatValueWrapper::CreateValue(const configcat::SettingValue& InValue)
{
Expand Down
16 changes: 2 additions & 14 deletions Source/ConfigCatWrappers/Private/ConfigCatWrappers.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
#include "ConfigCatWrappers.h"
// Copyright (c) ConfigCat 2024. All Rights Reserved.

#define LOCTEXT_NAMESPACE "FConfigCatWrappersModule"
#include "ConfigCatWrappers.h"

void FConfigCatWrappersModule::StartupModule()
{

}

void FConfigCatWrappersModule::ShutdownModule()
{

}

#undef LOCTEXT_NAMESPACE

IMPLEMENT_MODULE(FConfigCatWrappersModule, ConfigCatWrappers)
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class UConfigCatUserWrapper;
class UConfigCatValueWrapper;

UCLASS(DisplayName="Config Cat Evaluation", Hidden)
class CONFIGCAT_API UConfigCatEvaluationWrapper : public UObject
class CONFIGCATWRAPPERS_API UConfigCatEvaluationWrapper : public UObject
{
GENERATED_BODY()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class UConfigCatValueWrapper;

UCLASS(DisplayName="Config Cat Percentage Option", Hidden)
class UConfigCatPercentageOptionWrapper : public UObject
class CONFIGCATWRAPPERS_API UConfigCatPercentageOptionWrapper : public UObject
{
GENERATED_BODY()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class UConfigCatValueWrapper;
UCLASS(DisplayName="Config Cat Setting Value Container", Hidden)
class CONFIGCAT_API UConfigCatSettingValueContainerWrapper : public UObject
class CONFIGCATWRAPPERS_API UConfigCatSettingValueContainerWrapper : public UObject
{
GENERATED_BODY()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ enum EConfigCatSettingTypeWrapper : uint8
};

UCLASS(DisplayName="Config Cat Setting", Hidden)
class UConfigCatSettingWrapper : public UObject
class CONFIGCATWRAPPERS_API UConfigCatSettingWrapper : public UObject
{
GENERATED_BODY()

Expand Down Expand Up @@ -54,7 +54,7 @@ class UConfigCatSettingWrapper : public UObject
};

UCLASS(DisplayName="Config Cat Settings", Hidden)
class UConfigCatSettingsWrapper : public UObject
class CONFIGCATWRAPPERS_API UConfigCatSettingsWrapper : public UObject
{
GENERATED_BODY()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ enum class EConfigCatUserComparator : uint8
};

UCLASS(DisplayName="Config Cat User Condition", Hidden)
class UConfigCatUserConditionWrapper : public UObject
class CONFIGCATWRAPPERS_API UConfigCatUserConditionWrapper : public UObject
{
GENERATED_BODY()

Expand Down Expand Up @@ -85,7 +85,7 @@ enum class EConfigCatPrerequisiteFlagComparator : uint8
};

UCLASS(DisplayName="Config Cat Prerequisite Flag Condition", Hidden)
class UConfigCatPrerequisiteFlagConditionWrapper : public UObject
class CONFIGCATWRAPPERS_API UConfigCatPrerequisiteFlagConditionWrapper : public UObject
{
GENERATED_BODY()

Expand All @@ -111,7 +111,7 @@ enum class EConfigCatSegmentComparator : uint8
};

UCLASS(DisplayName="Config Cat Segment Condition", Hidden)
class UConfigCatSegmentConditionWrapper : public UObject
class CONFIGCATWRAPPERS_API UConfigCatSegmentConditionWrapper : public UObject
{
GENERATED_BODY()

Expand All @@ -127,7 +127,7 @@ class UConfigCatSegmentConditionWrapper : public UObject
};

USTRUCT(BlueprintType)
struct FConfigCatConditionContainer
struct CONFIGCATWRAPPERS_API FConfigCatConditionContainer
{
GENERATED_BODY()

Expand All @@ -152,7 +152,7 @@ struct FConfigCatThenContainer
};

UCLASS(DisplayName="Config Cat Targeting Rule", Hidden)
class UConfigCatTargetingRuleWrapper : public UObject
class CONFIGCATWRAPPERS_API UConfigCatTargetingRuleWrapper : public UObject
{
GENERATED_BODY()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "ConfigCatUserWrapper.generated.h"

UCLASS(DisplayName="Config Cat User", Hidden)
class CONFIGCAT_API UConfigCatUserWrapper : public UObject
class CONFIGCATWRAPPERS_API UConfigCatUserWrapper : public UObject
{
GENERATED_BODY()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "ConfigCatValueWrapper.generated.h"

UCLASS(DisplayName="Config Cat SettingValue", Hidden)
class CONFIGCAT_API UConfigCatValueWrapper : public UObject
class CONFIGCATWRAPPERS_API UConfigCatValueWrapper : public UObject
{
GENERATED_BODY()

Expand Down
13 changes: 7 additions & 6 deletions Source/ConfigCatWrappers/Public/ConfigCatWrappers.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#pragma once
// Copyright (c) ConfigCat 2024. All Rights Reserved.

#include "CoreMinimal.h"
#include "Modules/ModuleManager.h"
#pragma once

#include <Modules/ModuleManager.h>

/**
* @brief ConfigCatWrappers module contains all the blueprint-friendly wrapper classes based on the cpp-sdk classes
*/
class FConfigCatWrappersModule : public IModuleInterface
{
public:
virtual void StartupModule() override;
virtual void ShutdownModule() override;
};

0 comments on commit 437ba49

Please sign in to comment.