KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
UConfigLibrary.h
이 파일의 문서화 페이지로 가기
1// Copyright (c) 2025 Doppleddiggong. All rights reserved. Unauthorized copying, modification, or distribution of this file, via any medium is strictly prohibited. Proprietary and confidential.
2
21#pragma once
22
23#include "CoreMinimal.h"
24#include "Kismet/BlueprintFunctionLibrary.h"
25#include "UConfigLibrary.generated.h"
26
37UCLASS()
38class COFFEELIBRARY_API UConfigLibrary : public UBlueprintFunctionLibrary
39{
40 GENERATED_BODY()
41
42public:
43 // =====================================================================
44 // INTEGER OPERATIONS - GLOBAL
45 // =====================================================================
46
51 UFUNCTION(BlueprintPure, Category = "Config|Global")
52 static int32 GetInt(const FString& Key, int32 DefaultValue = 0);
53
58 UFUNCTION(BlueprintCallable, Category = "Config|Global")
59 static void SetInt(const FString& Key, int32 Value, bool bAutoSave = true);
60
61 // =====================================================================
62 // FLOAT OPERATIONS - GLOBAL
63 // =====================================================================
64
69 UFUNCTION(BlueprintPure, Category = "Config|Global")
70 static float GetFloat(const FString& Key, float DefaultValue = 0.0f);
71
76 UFUNCTION(BlueprintCallable, Category = "Config|Global")
77 static void SetFloat(const FString& Key, float Value, bool bAutoSave = true);
78
79 // =====================================================================
80 // STRING OPERATIONS - GLOBAL
81 // =====================================================================
82
87 UFUNCTION(BlueprintPure, Category = "Config|Global")
88 static FString GetString(const FString& Key, const FString& DefaultValue = TEXT(""));
89
94 UFUNCTION(BlueprintCallable, Category = "Config|Global")
95 static void SetString(const FString& Key, const FString& Value, bool bAutoSave = true);
96
97 // =====================================================================
98 // BOOLEAN OPERATIONS - GLOBAL
99 // =====================================================================
100
106 UFUNCTION(BlueprintPure, Category = "Config|Global")
107 static bool GetBool(const FString& Key, bool bDefaultValue = false);
108
114 UFUNCTION(BlueprintCallable, Category = "Config|Global")
115 static void SetBool(const FString& Key, bool bValue, bool bAutoSave = true);
116
117 // =====================================================================
118 // INTEGER OPERATIONS - USER-SPECIFIC
119 // =====================================================================
120
126 UFUNCTION(BlueprintPure, Category = "Config|User")
127 static int32 GetUserInt(int32 UserId, const FString& Key, int32 DefaultValue = 0);
128
134 UFUNCTION(BlueprintCallable, Category = "Config|User")
135 static void SetUserInt(int32 UserId, const FString& Key, int32 Value, bool bAutoSave = true);
136
137 // =====================================================================
138 // FLOAT OPERATIONS - USER-SPECIFIC
139 // =====================================================================
140
146 UFUNCTION(BlueprintPure, Category = "Config|User")
147 static float GetUserFloat(int32 UserId, const FString& Key, float DefaultValue = 0.0f);
148
154 UFUNCTION(BlueprintCallable, Category = "Config|User")
155 static void SetUserFloat(int32 UserId, const FString& Key, float Value, bool bAutoSave = true);
156
157 // =====================================================================
158 // STRING OPERATIONS - USER-SPECIFIC
159 // =====================================================================
160
166 UFUNCTION(BlueprintPure, Category = "Config|User")
167 static FString GetUserString(int32 UserId, const FString& Key, const FString& DefaultValue = TEXT(""));
168
174 UFUNCTION(BlueprintCallable, Category = "Config|User")
175 static void SetUserString(int32 UserId, const FString& Key, const FString& Value, bool bAutoSave = true);
176
177 // =====================================================================
178 // BOOLEAN OPERATIONS - USER-SPECIFIC
179 // =====================================================================
180
187 UFUNCTION(BlueprintPure, Category = "Config|User")
188 static bool GetUserBool(int32 UserId, const FString& Key, bool bDefaultValue = false);
189
196 UFUNCTION(BlueprintCallable, Category = "Config|User")
197 static void SetUserBool(int32 UserId, const FString& Key, bool bValue, bool bAutoSave = true);
198
199 // =====================================================================
200 // JSON OPERATIONS - USER-SPECIFIC
201 // =====================================================================
202
209 UFUNCTION(BlueprintCallable, Category = "Config|User|JSON")
210 static void SetUserJson(int32 UserId, const FString& Key, const FString& JsonData, bool bAutoSave = true);
211
218 UFUNCTION(BlueprintPure, Category = "Config|User|JSON")
219 static FString GetUserJson(int32 UserId, const FString& Key, const FString& DefaultJson = TEXT("[]"));
220
221 // =====================================================================
222 // KEY MANAGEMENT
223 // =====================================================================
224
228 UFUNCTION(BlueprintPure, Category = "Config|Management")
229 static bool HasKey(const FString& Key);
230
235 UFUNCTION(BlueprintPure, Category = "Config|Management")
236 static bool HasUserKey(int32 UserId, const FString& Key);
237
241 UFUNCTION(BlueprintCallable, Category = "Config|Management")
242 static void DeleteKey(const FString& Key, bool bAutoSave = true);
243
248 UFUNCTION(BlueprintCallable, Category = "Config|Management")
249 static void DeleteUserKey(int32 UserId, const FString& Key, bool bAutoSave = true);
250
254 UFUNCTION(BlueprintCallable, Category = "Config|Management")
255 static void DeleteAll(bool bAutoSave = true);
256
261 UFUNCTION(BlueprintCallable, Category = "Config|Management")
262 static void DeleteAllUserData(int32 UserId, bool bAutoSave = true);
263
266 UFUNCTION(BlueprintCallable, Category = "Config|Management")
267 static void Save();
268
269private:
270 // =====================================================================
271 // INTERNAL HELPERS
272 // =====================================================================
273
276 static FString GetGlobalSection();
277
280 static FString GetUserSection();
281
286 static FString MakeUserKey(int32 UserId, const FString& Key);
287};
GConfig 래퍼 라이브러리