Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FConfigFile Class Reference

#include <ConfigCacheIni.h>

+ Inheritance diagram for FConfigFile:
+ Collaboration diagram for FConfigFile:

Public Member Functions

 FConfigFile ()
 
 FConfigFile (int32)
 
 ~FConfigFile ()
 
FConfigSectionFindOrAddSection (const FString &Name)
 
bool operator== (const FConfigFile &Other) const
 
bool operator!= (const FConfigFile &Other) const
 
bool Combine (const FString &Filename)
 
void CombineFromBuffer (const FString &Buffer, const FString &FileHint)
 
void CombineFromBuffer (const FString &Buffer)
 
void Read (const FString &Filename)
 
bool Write (const FString &Filename, bool bDoRemoteWrite=true, const FString &PrefixText=FString())
 
void WriteToString (FString &InOutText, const FString &SimulatedFilename=FString(), const FString &PrefixText=FString())
 
void Dump (FOutputDevice &Ar)
 
bool GetString (const TCHAR *Section, const TCHAR *Key, FString &Value) const
 
bool GetText (const TCHAR *Section, const TCHAR *Key, FText &Value) const
 
bool GetInt (const TCHAR *Section, const TCHAR *Key, int32 &Value) const
 
bool GetFloat (const TCHAR *Section, const TCHAR *Key, float &Value) const
 
bool GetDouble (const TCHAR *Section, const TCHAR *Key, double &Value) const
 
bool GetInt64 (const TCHAR *Section, const TCHAR *Key, int64 &Value) const
 
bool GetBool (const TCHAR *Section, const TCHAR *Key, bool &Value) const
 
int32 GetArray (const TCHAR *Section, const TCHAR *Key, TArray< FString > &Value) const
 
bool GetValue (const TCHAR *Section, const TCHAR *Key, FString &Value) const
 
bool GetValue (const TCHAR *Section, const TCHAR *Key, FText &Value) const
 
bool GetValue (const TCHAR *Section, const TCHAR *Key, int32 &Value) const
 
bool GetValue (const TCHAR *Section, const TCHAR *Key, float &Value) const
 
bool GetValue (const TCHAR *Section, const TCHAR *Key, double &Value) const
 
bool GetValue (const TCHAR *Section, const TCHAR *Key, int64 &Value) const
 
bool GetValue (const TCHAR *Section, const TCHAR *Key, bool &Value) const
 
int32 GetValue (const TCHAR *Section, const TCHAR *Key, TArray< FString > &Value) const
 
bool DoesSectionExist (const TCHAR *Section) const
 
void SetString (const TCHAR *Section, const TCHAR *Key, const TCHAR *Value)
 
void SetText (const TCHAR *Section, const TCHAR *Key, const FText &Value)
 
void SetFloat (const TCHAR *Section, const TCHAR *Key, float Value)
 
void SetDouble (const TCHAR *Section, const TCHAR *Key, double Value)
 
void SetBool (const TCHAR *Section, const TCHAR *Key, bool Value)
 
void SetInt64 (const TCHAR *Section, const TCHAR *Key, const int64 Value)
 
void SetArray (const TCHAR *Section, const TCHAR *Key, const TArray< FString > &Value)
 
void ProcessInputFileContents (FStringView Contents, const FString &FileHint)
 
void ProcessInputFileContents (const FString &Buffer)
 
void AddMissingProperties (const FConfigFile &InSourceFile)
 
void UpdateSections (const TCHAR *DiskFilename, const TCHAR *IniRootName=nullptr, const TCHAR *OverridePlatform=nullptr)
 
bool UpdateSinglePropertyInSection (const TCHAR *DiskFilename, const TCHAR *PropertyName, const TCHAR *SectionName)
 
void ProcessSourceAndCheckAgainstBackup ()
 
void AddDynamicLayerToHierarchy (const FString &Filename)
 
void AddDynamicLayerToHeirarchy (const FString &Filename)
 
- Public Member Functions inherited from TMap< FString, FConfigSection >
 TMap ()=default
 
 TMap (TMap &&)=default
 
 TMap (const TMap &)=default
 
 TMap (TMap< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &&Other)
 
 TMap (const TMap< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &Other)
 
 TMap (std::initializer_list< TPairInitializer< const KeyType &, const ValueType & > > InitList)
 
TMapoperator= (TMap &&)=default
 
TMapoperator= (const TMap &)=default
 
TMapoperator= (TMap< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &&Other)
 
TMapoperator= (const TMap< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &Other)
 
TMapoperator= (std::initializer_list< TPairInitializer< const KeyType &, const ValueType & > > InitList)
 
FORCEINLINE bool RemoveAndCopyValue (KeyInitType Key, ValueType &OutRemovedValue)
 
FORCEINLINE bool RemoveAndCopyValueByHash (uint32 KeyHash, const ComparableKey &Key, ValueType &OutRemovedValue)
 
FORCEINLINE ValueType FindAndRemoveChecked (KeyConstPointerType Key)
 
void Append (TMap< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &&OtherMap)
 
void Append (const TMap< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &OtherMap)
 
FORCEINLINE ValueTypeoperator[] (KeyConstPointerType Key)
 
FORCEINLINE const ValueTypeoperator[] (KeyConstPointerType Key) const
 
- Public Member Functions inherited from TSortableMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >
template<typename PREDICATE_CLASS >
FORCEINLINE void KeySort (const PREDICATE_CLASS &Predicate)
 
template<typename PREDICATE_CLASS >
FORCEINLINE void KeyStableSort (const PREDICATE_CLASS &Predicate)
 
template<typename PREDICATE_CLASS >
FORCEINLINE void ValueSort (const PREDICATE_CLASS &Predicate)
 
template<typename PREDICATE_CLASS >
FORCEINLINE void ValueStableSort (const PREDICATE_CLASS &Predicate)
 
void SortFreeList ()
 
- Public Member Functions inherited from TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >
bool OrderIndependentCompareEqual (const TMapBase &Other) const
 
FORCEINLINE void Empty (int32 ExpectedNumElements=0)
 
FORCEINLINE void Reset ()
 
FORCEINLINE void Shrink ()
 
FORCEINLINE void Compact ()
 
FORCEINLINE void CompactStable ()
 
FORCEINLINE void Reserve (int32 Number)
 
bool IsEmpty () const
 
FORCEINLINE int32 Num () const
 
template<typename Allocator >
int32 GetKeys (TArray< KeyType, Allocator > &OutKeys) const
 
template<typename Allocator >
int32 GetKeys (TSet< KeyType, Allocator > &OutKeys) const
 
FORCEINLINE SIZE_T GetAllocatedSize () const
 
FORCEINLINE void CountBytes (FArchive &Ar) const
 
FORCEINLINE ValueType & Add (const KeyType &InKey, const ValueType &InValue)
 
FORCEINLINE ValueType & Add (const KeyType &InKey, ValueType &&InValue)
 
FORCEINLINE ValueType & Add (KeyType &&InKey, const ValueType &InValue)
 
FORCEINLINE ValueType & Add (KeyType &&InKey, ValueType &&InValue)
 
FORCEINLINE ValueType & AddByHash (uint32 KeyHash, const KeyType &InKey, const ValueType &InValue)
 
FORCEINLINE ValueType & AddByHash (uint32 KeyHash, const KeyType &InKey, ValueType &&InValue)
 
FORCEINLINE ValueType & AddByHash (uint32 KeyHash, KeyType &&InKey, const ValueType &InValue)
 
FORCEINLINE ValueType & AddByHash (uint32 KeyHash, KeyType &&InKey, ValueType &&InValue)
 
FORCEINLINE ValueType & Add (const KeyType &InKey)
 
FORCEINLINE ValueType & Add (KeyType &&InKey)
 
FORCEINLINE ValueType & AddByHash (uint32 KeyHash, const KeyType &InKey)
 
FORCEINLINE ValueType & AddByHash (uint32 KeyHash, KeyType &&InKey)
 
FORCEINLINE ValueType & Add (const TTuple< KeyType, ValueType > &InKeyValue)
 
FORCEINLINE ValueType & Add (TTuple< KeyType, ValueType > &&InKeyValue)
 
template<typename InitKeyType = KeyType, typename InitValueType = ValueType>
ValueType & Emplace (InitKeyType &&InKey, InitValueType &&InValue)
 
template<typename InitKeyType = KeyType, typename InitValueType = ValueType>
ValueType & EmplaceByHash (uint32 KeyHash, InitKeyType &&InKey, InitValueType &&InValue)
 
template<typename InitKeyType = KeyType>
ValueType & Emplace (InitKeyType &&InKey)
 
template<typename InitKeyType = KeyType>
ValueType & EmplaceByHash (uint32 KeyHash, InitKeyType &&InKey)
 
FORCEINLINE int32 Remove (KeyConstPointerType InKey)
 
template<typename ComparableKey >
FORCEINLINE int32 RemoveByHash (uint32 KeyHash, const ComparableKey &Key)
 
const KeyType * FindKey (ValueInitType Value) const
 
template<typename Predicate >
TMap< KeyType, ValueType > FilterByPredicate (Predicate Pred) const
 
FORCEINLINE ValueType * Find (KeyConstPointerType Key)
 
FORCEINLINE const ValueType * Find (KeyConstPointerType Key) const
 
template<typename ComparableKey >
FORCEINLINE ValueType * FindByHash (uint32 KeyHash, const ComparableKey &Key)
 
template<typename ComparableKey >
FORCEINLINE const ValueType * FindByHash (uint32 KeyHash, const ComparableKey &Key) const
 
FORCEINLINE ValueType & FindOrAdd (const KeyType &Key)
 
FORCEINLINE ValueType & FindOrAdd (KeyType &&Key)
 
FORCEINLINE ValueType & FindOrAddByHash (uint32 KeyHash, const KeyType &Key)
 
FORCEINLINE ValueType & FindOrAddByHash (uint32 KeyHash, KeyType &&Key)
 
FORCEINLINE ValueType & FindOrAdd (const KeyType &Key, const ValueType &Value)
 
FORCEINLINE ValueType & FindOrAdd (const KeyType &Key, ValueType &&Value)
 
FORCEINLINE ValueType & FindOrAdd (KeyType &&Key, const ValueType &Value)
 
FORCEINLINE ValueType & FindOrAdd (KeyType &&Key, ValueType &&Value)
 
FORCEINLINE ValueType & FindOrAddByHash (uint32 KeyHash, const KeyType &Key, const ValueType &Value)
 
FORCEINLINE ValueType & FindOrAddByHash (uint32 KeyHash, const KeyType &Key, ValueType &&Value)
 
FORCEINLINE ValueType & FindOrAddByHash (uint32 KeyHash, KeyType &&Key, const ValueType &Value)
 
FORCEINLINE ValueType & FindOrAddByHash (uint32 KeyHash, KeyType &&Key, ValueType &&Value)
 
FORCEINLINE const ValueType & FindChecked (KeyConstPointerType Key) const
 
FORCEINLINE ValueType & FindChecked (KeyConstPointerType Key)
 
FORCEINLINE ValueType FindRef (KeyConstPointerType Key) const
 
FORCEINLINE bool Contains (KeyConstPointerType Key) const
 
template<typename ComparableKey >
FORCEINLINE bool ContainsByHash (uint32 KeyHash, const ComparableKey &Key) const
 
TArray< ElementTypeArray () const
 
template<typename Allocator >
void GenerateKeyArray (TArray< KeyType, Allocator > &OutArray) const
 
template<typename Allocator >
void GenerateValueArray (TArray< ValueType, Allocator > &OutArray) const
 
void Dump (FOutputDevice &Ar)
 
void WriteMemoryImage (FMemoryImageWriter &Writer) const
 
void CopyUnfrozen (const FMemoryUnfreezeContent &Context, void *Dst) const
 
FORCEINLINE TIterator CreateIterator ()
 
FORCEINLINE TConstIterator CreateConstIterator () const
 
FORCEINLINE TKeyIterator CreateKeyIterator (typename TKeyIterator::KeyArgumentType InKey)
 
FORCEINLINE TConstKeyIterator CreateConstKeyIterator (typename TConstKeyIterator::KeyArgumentType InKey) const
 
FORCEINLINE TRangedForIterator begin ()
 
FORCEINLINE TRangedForConstIterator begin () const
 
FORCEINLINE TRangedForIterator end ()
 
FORCEINLINE TRangedForConstIterator end () const
 

Static Public Member Functions

static bool WriteTempFileThenMove ()
 
static bool ShouldExportQuotedString (const FString &PropertyValue)
 
static FString GenerateExportedPropertyLine (const FString &PropertyName, const FString &PropertyValue)
 
static void AppendExportedPropertyLine (FString &Out, const FString &PropertyName, const FString &PropertyValue)
 
static void OverrideFromCommandline (FConfigFile *File, const FString &Filename)
 
static bool OverrideFileFromCommandline (FString &Filename)
 
- Static Public Member Functions inherited from TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >
static void AppendHash (const FPlatformTypeLayoutParameters &LayoutParams, FSHA1 &Hasher)
 

Public Attributes

bool Dirty
 
bool NoSave
 
bool bHasPlatformName = false
 
FName Name
 
FConfigFileHierarchy SourceIniHierarchy
 
FString SourceEngineConfigDir
 
FString SourceProjectConfigDir
 
FConfigFileSourceConfigFile
 
FString PlatformName
 
TArray< FConfigCommandlineOverrideCommandlineOptions
 

Private Member Functions

bool IsADefaultIniWrite (const FString &Filename, int32 &OutIniCombineThreshold) const
 
bool WriteInternal (const FString &Filename, bool bDoRemoteWrite, TMap< FString, FString > &InOutSectionTexts, const TArray< FString > &InSectionOrder)
 
void WriteToStringInternal (FString &InOutText, bool bIsADefaultIniWrite, int32 IniCombineThreshold, TMap< FString, FString > &InOutSectionTexts, const TArray< FString > &InSectionOrder)
 
void SaveSourceToBackupFile ()
 
void ProcessPropertyAndWriteForDefaults (int32 IniCombineThreshold, const TArray< const FConfigValue * > &InCompletePropertyToProcess, FString &OutText, const FString &SectionName, const FString &PropertyName)
 
void AddStaticLayersToHierarchy (const TCHAR *InBaseIniName, const TCHAR *InPlatformName, const TCHAR *EngineConfigDir, const TCHAR *SourceConfigDir)
 

Static Private Member Functions

static void AddStaticLayersToHierarchy (FConfigContext &Context)
 

Private Attributes

TMap< FString, TMap< FName, FString > > PerObjectConfigArrayOfStructKeys
 
friend FConfigContext
 

Friends

class FConfigCacheIni
 
FArchiveoperator<< (FArchive &Ar, FConfigFile &ConfigFile)
 

Additional Inherited Members

- Public Types inherited from TMap< FString, FConfigSection >
typedef FString KeyType
 
typedef FConfigSection ValueType
 
typedef SetAllocator SetAllocatorType
 
typedef KeyFuncs KeyFuncsType
 
typedef TSortableMapBase< KeyType, ValueType, SetAllocator, KeyFuncsSuper
 
typedef Super::KeyInitType KeyInitType
 
typedef Super::KeyConstPointerType KeyConstPointerType
 
- Public Types inherited from TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >
typedef TTypeTraits< KeyType >::ConstPointerType KeyConstPointerType
 
typedef TTypeTraits< KeyType >::ConstInitType KeyInitType
 
typedef TTypeTraits< ValueType >::ConstInitType ValueInitType
 
typedef TPair< KeyType, ValueType > ElementType
 
using TRangedForIterator = TBaseIterator<false, true>
 
using TRangedForConstIterator = TBaseIterator<true, true>
 
- Protected Types inherited from TSortableMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >
typedef TMapBase< KeyType, ValueType, SetAllocator, KeyFuncsSuper
 
- Protected Types inherited from TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >
typedef TSet< ElementType, KeyFuncs, SetAllocatorElementSetType
 
- Protected Member Functions inherited from TSortableMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >
 TSortableMapBase ()=default
 
 TSortableMapBase (TSortableMapBase &&)=default
 
 TSortableMapBase (const TSortableMapBase &)=default
 
TSortableMapBaseoperator= (TSortableMapBase &&)=default
 
TSortableMapBaseoperator= (const TSortableMapBase &)=default
 
template<typename OtherSetAllocator >
 TSortableMapBase (TSortableMapBase< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &&Other)
 
template<typename OtherSetAllocator >
 TSortableMapBase (const TSortableMapBase< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &Other)
 
template<typename OtherSetAllocator >
TSortableMapBaseoperator= (TSortableMapBase< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &&Other)
 
template<typename OtherSetAllocator >
TSortableMapBaseoperator= (const TSortableMapBase< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &Other)
 
- Protected Member Functions inherited from TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >
 TMapBase ()=default
 
 TMapBase (TMapBase &&)=default
 
 TMapBase (const TMapBase &)=default
 
TMapBaseoperator= (TMapBase &&)=default
 
TMapBaseoperator= (const TMapBase &)=default
 
template<typename OtherSetAllocator >
 TMapBase (TMapBase< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &&Other)
 
template<typename OtherSetAllocator >
 TMapBase (const TMapBase< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &Other)
 
template<typename OtherSetAllocator >
TMapBaseoperator= (TMapBase< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &&Other)
 
template<typename OtherSetAllocator >
TMapBaseoperator= (const TMapBase< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &Other)
 
- Protected Attributes inherited from TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >
ElementSetType Pairs
 

Detailed Description

Definition at line 374 of file ConfigCacheIni.h.

Constructor & Destructor Documentation

◆ FConfigFile() [1/2]

FConfigFile::FConfigFile ( )

◆ FConfigFile() [2/2]

FConfigFile::FConfigFile ( int32 )
inline

Definition at line 402 of file ConfigCacheIni.h.

◆ ~FConfigFile()

FConfigFile::~FConfigFile ( )

Member Function Documentation

◆ AddDynamicLayerToHeirarchy()

void FConfigFile::AddDynamicLayerToHeirarchy ( const FString & Filename)
inline

Definition at line 583 of file ConfigCacheIni.h.

+ Here is the call graph for this function:

◆ AddDynamicLayerToHierarchy()

void FConfigFile::AddDynamicLayerToHierarchy ( const FString & Filename)

Appends a new INI file to the SourceIniHierarchy and combines it with the current contents

+ Here is the caller graph for this function:

◆ AddMissingProperties()

void FConfigFile::AddMissingProperties ( const FConfigFile & InSourceFile)

Adds any properties that exist in InSourceFile that this config file is missing

◆ AddStaticLayersToHierarchy() [1/2]

void FConfigFile::AddStaticLayersToHierarchy ( const TCHAR * InBaseIniName,
const TCHAR * InPlatformName,
const TCHAR * EngineConfigDir,
const TCHAR * SourceConfigDir )
private

Creates a chain of ini filenames to load and combine.

Parameters
InBaseIniNameIni name.
InPlatformNamePlatform name, nullptr means to use the current platform
OutHierarchyAn array which is to receive the generated hierachy of ini filenames.

◆ AddStaticLayersToHierarchy() [2/2]

static void FConfigFile::AddStaticLayersToHierarchy ( FConfigContext & Context)
staticprivate

◆ AppendExportedPropertyLine()

static void FConfigFile::AppendExportedPropertyLine ( FString & Out,
const FString & PropertyName,
const FString & PropertyValue )
static

Append a correctly escaped line to add to the config file for the given property

◆ Combine()

bool FConfigFile::Combine ( const FString & Filename)

◆ CombineFromBuffer() [1/2]

void FConfigFile::CombineFromBuffer ( const FString & Buffer)
inline

Definition at line 414 of file ConfigCacheIni.h.

+ Here is the call graph for this function:

◆ CombineFromBuffer() [2/2]

void FConfigFile::CombineFromBuffer ( const FString & Buffer,
const FString & FileHint )
+ Here is the caller graph for this function:

◆ DoesSectionExist()

bool FConfigFile::DoesSectionExist ( const TCHAR * Section) const

◆ Dump()

void FConfigFile::Dump ( FOutputDevice & Ar)

◆ FindOrAddSection()

FConfigSection * FConfigFile::FindOrAddSection ( const FString & Name)

◆ GenerateExportedPropertyLine()

static FString FConfigFile::GenerateExportedPropertyLine ( const FString & PropertyName,
const FString & PropertyValue )
static

Generate a correctly escaped line to add to the config file for the given property

◆ GetArray()

int32 FConfigFile::GetArray ( const TCHAR * Section,
const TCHAR * Key,
TArray< FString > & Value ) const

◆ GetBool()

bool FConfigFile::GetBool ( const TCHAR * Section,
const TCHAR * Key,
bool & Value ) const
+ Here is the caller graph for this function:

◆ GetDouble()

bool FConfigFile::GetDouble ( const TCHAR * Section,
const TCHAR * Key,
double & Value ) const
+ Here is the caller graph for this function:

◆ GetFloat()

bool FConfigFile::GetFloat ( const TCHAR * Section,
const TCHAR * Key,
float & Value ) const
+ Here is the caller graph for this function:

◆ GetInt()

bool FConfigFile::GetInt ( const TCHAR * Section,
const TCHAR * Key,
int32 & Value ) const
+ Here is the caller graph for this function:

◆ GetInt64()

bool FConfigFile::GetInt64 ( const TCHAR * Section,
const TCHAR * Key,
int64 & Value ) const
+ Here is the caller graph for this function:

◆ GetString()

bool FConfigFile::GetString ( const TCHAR * Section,
const TCHAR * Key,
FString & Value ) const
+ Here is the caller graph for this function:

◆ GetText()

bool FConfigFile::GetText ( const TCHAR * Section,
const TCHAR * Key,
FText & Value ) const
+ Here is the caller graph for this function:

◆ GetValue() [1/8]

bool FConfigFile::GetValue ( const TCHAR * Section,
const TCHAR * Key,
bool & Value ) const
inline

Definition at line 501 of file ConfigCacheIni.h.

+ Here is the call graph for this function:

◆ GetValue() [2/8]

bool FConfigFile::GetValue ( const TCHAR * Section,
const TCHAR * Key,
double & Value ) const
inline

Definition at line 493 of file ConfigCacheIni.h.

+ Here is the call graph for this function:

◆ GetValue() [3/8]

bool FConfigFile::GetValue ( const TCHAR * Section,
const TCHAR * Key,
float & Value ) const
inline

Definition at line 489 of file ConfigCacheIni.h.

+ Here is the call graph for this function:

◆ GetValue() [4/8]

bool FConfigFile::GetValue ( const TCHAR * Section,
const TCHAR * Key,
FString & Value ) const
inline

Definition at line 477 of file ConfigCacheIni.h.

+ Here is the call graph for this function:

◆ GetValue() [5/8]

bool FConfigFile::GetValue ( const TCHAR * Section,
const TCHAR * Key,
FText & Value ) const
inline

Definition at line 481 of file ConfigCacheIni.h.

+ Here is the call graph for this function:

◆ GetValue() [6/8]

bool FConfigFile::GetValue ( const TCHAR * Section,
const TCHAR * Key,
int32 & Value ) const
inline

Definition at line 485 of file ConfigCacheIni.h.

+ Here is the call graph for this function:

◆ GetValue() [7/8]

bool FConfigFile::GetValue ( const TCHAR * Section,
const TCHAR * Key,
int64 & Value ) const
inline

Definition at line 497 of file ConfigCacheIni.h.

+ Here is the call graph for this function:

◆ GetValue() [8/8]

int32 FConfigFile::GetValue ( const TCHAR * Section,
const TCHAR * Key,
TArray< FString > & Value ) const
inline

Definition at line 505 of file ConfigCacheIni.h.

◆ IsADefaultIniWrite()

bool FConfigFile::IsADefaultIniWrite ( const FString & Filename,
int32 & OutIniCombineThreshold ) const
private

Determine if writing a default hierarchal ini, and deduce position in the hierarchy

◆ operator!=()

bool FConfigFile::operator!= ( const FConfigFile & Other) const

◆ operator==()

bool FConfigFile::operator== ( const FConfigFile & Other) const

◆ OverrideFileFromCommandline()

static bool FConfigFile::OverrideFileFromCommandline ( FString & Filename)
static

Checks the command line for any overridden config file settings

◆ OverrideFromCommandline()

static void FConfigFile::OverrideFromCommandline ( FConfigFile * File,
const FString & Filename )
static

Checks the command line for any overridden config settings

◆ ProcessInputFileContents() [1/2]

void FConfigFile::ProcessInputFileContents ( const FString & Buffer)
inline

Definition at line 528 of file ConfigCacheIni.h.

◆ ProcessInputFileContents() [2/2]

void FConfigFile::ProcessInputFileContents ( FStringView Contents,
const FString & FileHint )

Process the contents of an .ini file that has been read into an FString

Parameters
FilenameName of the .ini file the contents came from
ContentsContents of the .ini file

◆ ProcessPropertyAndWriteForDefaults()

void FConfigFile::ProcessPropertyAndWriteForDefaults ( int32 IniCombineThreshold,
const TArray< const FConfigValue * > & InCompletePropertyToProcess,
FString & OutText,
const FString & SectionName,
const FString & PropertyName )
private

Process the property for Writing to a default file. We will need to check for array operations, as default ini's rely on this being correct to function properly

Parameters
IniCombineThreshold- Cutoff level for combining ini (to prevent applying changes from the same ini that we're writing)
InCompletePropertyToProcess- The complete property which we need to process for saving.
OutText- The stream we are processing the array to
SectionName- The section name the array property is being written to
PropertyName- The property name of the array

◆ ProcessSourceAndCheckAgainstBackup()

void FConfigFile::ProcessSourceAndCheckAgainstBackup ( )

Check the source hierarchy which was loaded without any user changes from the Config/Saved dir. If anything in the default/base options have changed, we need to ensure that these propagate through to the final config so they are not potentially ignored

◆ Read()

void FConfigFile::Read ( const FString & Filename)

◆ SaveSourceToBackupFile()

void FConfigFile::SaveSourceToBackupFile ( )
private

Save the source hierarchy which was loaded out to a backup file so we can check future changes in the base/default configs

◆ SetArray()

void FConfigFile::SetArray ( const TCHAR * Section,
const TCHAR * Key,
const TArray< FString > & Value )

◆ SetBool()

void FConfigFile::SetBool ( const TCHAR * Section,
const TCHAR * Key,
bool Value )

◆ SetDouble()

void FConfigFile::SetDouble ( const TCHAR * Section,
const TCHAR * Key,
double Value )

◆ SetFloat()

void FConfigFile::SetFloat ( const TCHAR * Section,
const TCHAR * Key,
float Value )

◆ SetInt64()

void FConfigFile::SetInt64 ( const TCHAR * Section,
const TCHAR * Key,
const int64 Value )

◆ SetString()

void FConfigFile::SetString ( const TCHAR * Section,
const TCHAR * Key,
const TCHAR * Value )

◆ SetText()

void FConfigFile::SetText ( const TCHAR * Section,
const TCHAR * Key,
const FText & Value )

◆ ShouldExportQuotedString()

static bool FConfigFile::ShouldExportQuotedString ( const FString & PropertyValue)
static

Checks if the PropertyValue should be exported in quotes when writing the ini to disk.

◆ UpdateSections()

void FConfigFile::UpdateSections ( const TCHAR * DiskFilename,
const TCHAR * IniRootName = nullptr,
const TCHAR * OverridePlatform = nullptr )

Saves only the sections in this FConfigFile into the given file. All other sections in the file are left alone. The sections in this file are completely replaced. If IniRootName is specified, the current section settings are diffed against the file in the hierarchy up to right before this file (so, if you are saving DefaultEngine.ini, and IniRootName is "Engine", then Base.ini and BaseEngine.ini will be loaded, and only differences against that will be saved into DefaultEngine.ini)


@todo: This currently doesn't work with array properties!! It will output the entire array, and without + notation!!

Parameters
IniRootNamethe name (like "Engine") to use to load a .ini hierarchy to diff against

◆ UpdateSinglePropertyInSection()

bool FConfigFile::UpdateSinglePropertyInSection ( const TCHAR * DiskFilename,
const TCHAR * PropertyName,
const TCHAR * SectionName )

Update a single property in the config file, for the section that is specified.

◆ Write()

bool FConfigFile::Write ( const FString & Filename,
bool bDoRemoteWrite = true,
const FString & PrefixText = FString() )

Write this ConfigFile to the given Filename, constructed the text from the config sections in *this, prepended by the optional PrefixText

◆ WriteInternal()

bool FConfigFile::WriteInternal ( const FString & Filename,
bool bDoRemoteWrite,
TMap< FString, FString > & InOutSectionTexts,
const TArray< FString > & InSectionOrder )
private

Write a ConfigFile to the given Filename, constructed from the given SectionTexts, in the given order, with sections in *this overriding sections in SectionTexts

Parameters
Filename- The file to write to
bDoRemoteWrite- If true, also write the file to FRemoteConfig::Get()
InOutSectionTexts- A map from section name to existing text for that section; text does not include the name of the section. Entries in the TMap that also exist in *this will be updated. If the empty string is present, it will be written out first (it is interpreted as a prefix before the first section)
InSectionOrder- List of section names in the order in which each section should be written to disk, from e.g. the existing file. Any section in this array that is not found in InOutSectionTexts will be ignored. Any section in InOutSectionTexts that is not in this array will be appended to the end. Duplicate entries are ignored; the first found index is used.
Returns
TRUE if the write was successful

◆ WriteTempFileThenMove()

static bool FConfigFile::WriteTempFileThenMove ( )
static

Whether to write a temp file then move it to it's destination when saving.

◆ WriteToString()

void FConfigFile::WriteToString ( FString & InOutText,
const FString & SimulatedFilename = FString(),
const FString & PrefixText = FString() )

Write this ConfigFile to the given string, constructed the text from the config sections in *this, prepended by the optional PrefixText

Parameters
SimulatedFilename- If writing a default hierarchal ini, can be used to correctly deduce position in the hierarchy

◆ WriteToStringInternal()

void FConfigFile::WriteToStringInternal ( FString & InOutText,
bool bIsADefaultIniWrite,
int32 IniCombineThreshold,
TMap< FString, FString > & InOutSectionTexts,
const TArray< FString > & InSectionOrder )
private

Write a ConfigFile to InOutText, constructed from the given SectionTexts, in the given order, with sections in *this overriding sections in SectionTexts

Parameters
InOutText- The string to write to
bIsADefaultIniWrite- If true, force all properties to be written
IniCombineThreshold- Cutoff level for combining ini (to prevent applying changes from the same ini that we're writing)
InOutSectionTexts- A map from section name to existing text for that section; text does not include the name of the section. Entries in the TMap that also exist in *this will be updated. If the empty string is present, it will be written out first (it is interpreted as a prefix before the first section)
InSectionOrder- List of section names in the order in which each section should be written to disk, from e.g. the existing file. Any section in this array that is not found in InOutSectionTexts will be ignored. Any section in InOutSectionTexts that is not in this array will be appended to the end. Duplicate entries are ignored; the first found index is used.
Returns
TRUE if the write was successful

Friends And Related Symbol Documentation

◆ FConfigCacheIni

Definition at line 620 of file ConfigCacheIni.h.

◆ operator<<

FArchive & operator<< ( FArchive & Ar,
FConfigFile & ConfigFile )
friend

Member Data Documentation

◆ bHasPlatformName

bool FConfigFile::bHasPlatformName = false

Definition at line 379 of file ConfigCacheIni.h.

◆ CommandlineOptions

TArray<FConfigCommandlineOverride> FConfigFile::CommandlineOptions

The collection of overrides which stemmed from the commandline

Definition at line 398 of file ConfigCacheIni.h.

◆ Dirty

bool FConfigFile::Dirty

Definition at line 377 of file ConfigCacheIni.h.

◆ FConfigContext

friend FConfigFile::FConfigContext
private

Definition at line 621 of file ConfigCacheIni.h.

◆ Name

FName FConfigFile::Name

The name of this config file

Definition at line 382 of file ConfigCacheIni.h.

◆ NoSave

bool FConfigFile::NoSave

Definition at line 378 of file ConfigCacheIni.h.

◆ PerObjectConfigArrayOfStructKeys

TMap<FString, TMap<FName, FString> > FConfigFile::PerObjectConfigArrayOfStructKeys
private

Definition at line 590 of file ConfigCacheIni.h.

◆ PlatformName

FString FConfigFile::PlatformName

Definition at line 394 of file ConfigCacheIni.h.

◆ SourceConfigFile

FConfigFile* FConfigFile::SourceConfigFile

The untainted config file which contains the coalesced base/default options. I.e. No Saved/ options

Definition at line 392 of file ConfigCacheIni.h.

◆ SourceEngineConfigDir

FString FConfigFile::SourceEngineConfigDir

Definition at line 388 of file ConfigCacheIni.h.

◆ SourceIniHierarchy

FConfigFileHierarchy FConfigFile::SourceIniHierarchy

Definition at line 385 of file ConfigCacheIni.h.

◆ SourceProjectConfigDir

FString FConfigFile::SourceProjectConfigDir

Definition at line 389 of file ConfigCacheIni.h.


The documentation for this class was generated from the following file: