Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
ConfigUtilities.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3/*-----------------------------------------------------------------------------
4 Config cache.
5-----------------------------------------------------------------------------*/
6
7#pragma once
8
9#include "Containers/Map.h"
10#include "Containers/UnrealString.h"
11#include "CoreTypes.h"
12#include "Delegates/Delegate.h"
13#include "Templates/Function.h"
14
15class FString;
17
18
20{
21 /**
22 * Single function to set a cvar from ini (handing friendly names, cheats for shipping and message about cheats in non shipping)
23 */
24 void OnSetCVarFromIniEntry(const TCHAR* IniFile, const TCHAR* Key, const TCHAR* Value, uint32 SetBy, bool bAllowCheating=false, bool bNoLogging=false);
25
26 /**
27 * Helper function to read the contents of an ini file and a specified group of cvar parameters, where sections in the ini file are marked [InName]
28 * @param InSectionBaseName - The base name of the section to apply cvars from
29 * @param InIniFilename - The ini filename
30 * @param SetBy anything in ECVF_LastSetMask e.g. ECVF_SetByScalability
31 */
32 void ApplyCVarSettingsFromIni(const TCHAR* InSectionBaseName, const TCHAR* InIniFilename, uint32 SetBy, bool bAllowCheating=false);
33
34 /**
35 * Helper function to operate a user defined function for each CVar key/value pair in the specified section in an ini file
36 * @param InSectionName - The name of the section to apply cvars from
37 * @param InIniFilename - The ini filename
38 * @param InEvaluationFunction - The evaluation function to be called for each key/value pair
39 */
40 void ForEachCVarInSectionFromIni(const TCHAR* InSectionName, const TCHAR* InIniFilename, TFunction<void(IConsoleVariable* CVar, const FString& KeyString, const FString& ValueString)> InEvaluationFunction);
41
42 /**
43 * CVAR Ini history records all calls to ApplyCVarSettingsFromIni and can re run them
44 */
45
46 /**
47 * Helper function to start recording ApplyCVarSettings function calls
48 * uses these to generate a history of applied ini settings sections
49 */
51
52 /**
53 * Helper function to reapply inis which have been applied after RecordCVarIniHistory was called
54 */
56
57 /**
58 * Helper function to clean up ini history
59 */
61
62 /**
63 * Helper function to start recording config reads
64 */
66
67 /**
68 * Helper function to dump config reads to csv after RecordConfigReadsFromIni was called
69 */
71
72 /**
73 * Helper function to clean up config read history
74 */
76
77 /**
78 * Helper function to deal with "True","False","Yes","No","On","Off"
79 */
80 const TCHAR* ConvertValueFromHumanFriendlyValue(const TCHAR* Value);
81}
const TCHAR * ConvertValueFromHumanFriendlyValue(const TCHAR *Value)
void DeleteRecordedConfigReadsFromIni()
void DumpRecordedConfigReadsFromIni()
void OnSetCVarFromIniEntry(const TCHAR *IniFile, const TCHAR *Key, const TCHAR *Value, uint32 SetBy, bool bAllowCheating=false, bool bNoLogging=false)
void ReapplyRecordedCVarSettingsFromIni()
void RecordApplyCVarSettingsFromIni()
void DeleteRecordedCVarSettingsFromIni()
void ApplyCVarSettingsFromIni(const TCHAR *InSectionBaseName, const TCHAR *InIniFilename, uint32 SetBy, bool bAllowCheating=false)
void ForEachCVarInSectionFromIni(const TCHAR *InSectionName, const TCHAR *InIniFilename, TFunction< void(IConsoleVariable *CVar, const FString &KeyString, const FString &ValueString)> InEvaluationFunction)
void RecordConfigReadsFromIni()
Definition Vector.h:40