FConfigCacheIni

Set of all cached config files.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

TMapBase

TSortableMapBase

TMap

FConfigCacheIni

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/ConfigCacheIni.h

Include

#include "Misc/ConfigCacheIni.h"

Syntax

class FConfigCacheIni : private TMap< FString, FConfigFile >

Remarks

Set of all cached config files.

Constructors

Name Description

Public function

FConfigCacheIni()

DO NOT USE. This constructor is for internal usage only for hot-reload purposes.

Public function

FConfigCacheIni

(
    EConfigCacheType Type
)

Basic functions.

Destructors

Name Description

Public function Virtual

~FConfigCacheIni()

Functions

Name Description

Public function

FConfigFile ...

 

Add

(
    const FString& Filename,
    const FConfigFile& File
)

Public function Virtual

bool

 

AreFileOperationsDisabled()

Returns whether or not file operations are disabled

Public function Static

void

 

ClearOtherPlatformConfigs()

Wipe all cached platform configs. Next ForPlatform call will load on-demand the platform configs

Public function Const

bool

 

ContainsConfigFile

(
    const FConfigFile* ConfigFile
)

Reports whether an FConfigFile* is pointing to a config file inside of this Used for downstream functions to check whether a config file they were passed came from this ConfigCacheIni or from a different source such as LoadLocalIniFile

Public function Static

bool

 

CreateGConfigFromSaved

(
    const TCHAR* Filename
)

Create GConfig from a saved file

Public function

void

 

Detach

(
    const FString& Filename
)

Public function Virtual

void

 

DisableFileOperations()

Disables any file IO by the config cache system

Public function

bool

 

DoesSectionExist

(
    const TCHAR* Section,
    const FString& Filename
)

Public function

void

 

Dump

(
    FOutputDevice& Ar,
    const TCHAR* IniName
)

Prints out the entire config set, or just a single file if an ini is specified

Public function

bool

 

EmptySection

(
    const TCHAR* Section,
    const FString& Filename
)

Public function

bool

 

EmptySectionsMatchingString

(
    const TCHAR* SectionString,
    const FString& Filename
)

Public function Virtual

void

 

EnableFileOperations()

Re-enables file IO by the config cache system

Public function

void

 

Exit()

Public function

FConfigFile ...

 

Find

(
    const FString& InFilename
)

Finds, loads, or creates the in-memory config file for a config cache filename.

Public function

FConfigFile ...

 

FindConfigFile

(
    const FString& Filename
)

Finds the in-memory config file for a config cache filename.

Public function

FConfigFile ...

 

FindConfigFileWithBaseName

(
    FName BaseName
)

Finds Config file that matches the base name such as "Engine"

Public function

void

 

Flush

(
    bool Read,
    const FString& Filename
)

Public function Virtual

bool

 

ForEachEntry

(
    const FKeyValueSink& Visitor,
    const TCHAR* Section,
    const FString& Filename
)

Allows to iterate through all key value pairs

Public function Static

FConfigCache...

 

ForPlatform

(
    FName PlatformName
)

Retrieve the fully processed ini system for another platform.

Public function

int32

 

GetArray

(
    const TCHAR* Section,
    const TCHAR* Key,
    TArray< FString >& out_Arr,
    const FString& Filename
)

Public function

bool

 

GetBool

(
    const TCHAR* Section,
    const TCHAR* Key,
    bool& Value,
    const FString& Filename
)

Public function

bool

 

GetColor

(
    const TCHAR* Section,
    const TCHAR* Key,
    FColor& Value,
    const FString& Filename
)

Public function

FString

 

GetConfigFilename

(
    const TCHAR* BaseIniName
)

For a base ini name, gets the config cache filename key that is used by other functions like Find.

Public function

void

 

GetConfigFilenames

(
    TArray< FString >& ConfigFilenames
)

Retrieve a list of all of the config files stored in the cache

Public function Static

const FStrin...

 

GetCustomConfigString()

Returns the Custom Config string, which if set will load additional config files from Config/Custom/{CustomConfig}/DefaultX.ini to allow different types of builds.

Public function Static

FString

 

GetDestIniFilename

(
    const TCHAR* BaseIniName,
    const TCHAR* PlatformName,
    const TCHAR* GeneratedConfigDi...
)

Calculates the name of a dest (generated) .ini file for a given base (ie Engine, Game, etc)

Public function

bool

 

GetDouble

(
    const TCHAR* Section,
    const TCHAR* Key,
    double& Value,
    const FString& Filename
)

Public function

TArray< FStr...

 

GetFilenames()

Public function

bool

 

GetFloat

(
    const TCHAR* Section,
    const TCHAR* Key,
    float& Value,
    const FString& Filename
)

Public function Static

const TSet< ...

 

GetIniCacheSet()

Public function

bool

 

GetInt

(
    const TCHAR* Section,
    const TCHAR* Key,
    int32& Value,
    const FString& Filename
)

Public function Virtual

SIZE_T

 

GetMaxMemoryUsage()

USed to get the max memory usage for the FConfigCacheIni

Public function

bool

 

GetPerObjectConfigSections

(
    const FString& Filename,
    const FString& SearchClass,
    TArray< FString >& out_SectionName...,
    int32 MaxResults
)

Retrieve the names of sections which contain data for the specified PerObjectConfig class.

Public function

bool

 

GetRotator

(
    const TCHAR* Section,
    const TCHAR* Key,
    FRotator& Value,
    const FString& Filename
)

Public function

bool

 

GetSection

(
    const TCHAR* Section,
    TArray< FString >& Result,
    const FString& Filename
)

Public function

bool

 

GetSectionNames

(
    const FString& Filename,
    TArray< FString >& out_SectionName...
)

Retrieve the names for all sections contained in the file specified by Filename

Public function

FConfigSecti...

 

GetSectionPrivate

(
    const TCHAR* Section,
    const bool Force,
    const bool Const,
    const FString& Filename
)

Public function

int32

 

GetSingleLineArray

(
    const TCHAR* Section,
    const TCHAR* Key,
    TArray< FString >& out_Arr,
    const FString& Filename
)

Loads a "delimited" list of strings Loads a "delimited" list of string

Public function

FString

 

GetStr

(
    const TCHAR* Section,
    const TCHAR* Key,
    const FString& Filename
)

Derived functions.

Public function

bool

 

GetString

(
    const TCHAR* Section,
    const TCHAR* Key,
    FString& Value,
    const FString& Filename
)

Public function

bool

 

GetText

(
    const TCHAR* Section,
    const TCHAR* Key,
    FText& Value,
    const FString& Filename
)

Public function

bool

 

GetValue

(
    const TCHAR* Section,
    const TCHAR* Key,
    float& Value,
    const FString& Filename
)

Public function

bool

 

GetValue

(
    const TCHAR* Section,
    const TCHAR* Key,
    int32& Value,
    const FString& Filename
)

Public function

bool

 

GetValue

(
    const TCHAR* Section,
    const TCHAR* Key,
    FText& Value,
    const FString& Filename
)

Public function

bool

 

GetValue

(
    const TCHAR* Section,
    const TCHAR* Key,
    FString& Value,
    const FString& Filename
)

Generic versions for use with templates

Public function

int32

 

GetValue

(
    const TCHAR* Section,
    const TCHAR* Key,
    TArray< FString >& Value,
    const FString& Filename
)

Public function

bool

 

GetValue

(
    const TCHAR* Section,
    const TCHAR* Key,
    bool& Value,
    const FString& Filename
)

Public function

bool

 

GetVector

(
    const TCHAR* Section,
    const TCHAR* Key,
    FVector& Value,
    const FString& Filename
)

Public function

bool

 

GetVector2D

(
    const TCHAR* Section,
    const TCHAR* Key,
    FVector2D& Value,
    const FString& Filename
)

Public function

bool

 

GetVector4

(
    const TCHAR* Section,
    const TCHAR* Key,
    FVector4& Value,
    const FString& Filename
)

Public function Static

void

 

InitializeConfigSystem()

Creates GConfig, loads the standard global ini files (Engine, Editor, etc), fills out GEngineIni, etc.

Public function

bool

 

InitializeKnownConfigFiles

(
    const TCHAR* PlatformName,
    bool bDefaultEngineIniRequired
)

Load the standard (used on all platforms) ini files, like Engine, Input, etc

Public function

bool

 

IsKnownConfigName

(
    FName ConfigName
)

Returns true if the given name is one of the known configs, where the matching G****Ini property is going to match the base name ("Engine" returns true, which means GEngineIni's value is just "Engine")

Public function

bool

 

IsReadyForUse()

Public function Static

void

 

LoadConsoleVariablesFromINI()

Needs to be called after GConfig is set and LoadCoalescedFile was called.

Public function Static

bool

 

LoadExternalIniFile

(
    FConfigFile& ConfigFile,
    const TCHAR* IniName,
    const TCHAR* EngineConfigDir,
    const TCHAR* SourceConfigDir,
    bool bIsBaseIniName,
    const TCHAR* Platform,
    bool bForceReload,
    bool bWriteDestIni,
    bool bAllowGeneratedIniWhenCooked,
    const TCHAR* GeneratedConfigDi...
)

Load an ini file directly into an FConfigFile from the specified config folders, optionally writing to disk.

Public function

void

 

LoadFile

(
    const FString& InFilename,
    const FConfigFile* Fallback,
    const TCHAR* PlatformString
)

Public function Static

bool

 

LoadGlobalIniFile

(
    FString& FinalIniFilename,
    const TCHAR* BaseIniName,
    const TCHAR* Platform,
    bool bForceReload,
    bool bRequireDefaultIni,
    bool bAllowGeneratedIniWhenCooked,
    bool bAllowRemoteConfig,
    const TCHAR* GeneratedConfigDi...,
    FConfigCacheIni* ConfigSystem
)

Loads and generates a destination ini file and adds it to GConfig:

Public function Static

bool

 

LoadLocalIniFile

(
    FConfigFile& ConfigFile,
    const TCHAR* IniName,
    bool bIsBaseIniName,
    const TCHAR* Platform,
    bool bForceReload
)

Load an ini file directly into an FConfigFile, and nothing is written to GConfig or disk.

Public function Virtual

void

 

Parse1ToNSectionOfNames

(
    const TCHAR* Section,
    const TCHAR* KeyOne,
    const TCHAR* KeyN,
    TMap< FName, TArray< FName > >& Ou...,
    const FString& Filename
)

Parses apart an ini section that contains a list of 1-to-N mappings of names in the following format [PerMapPackages] MapName=Map1 Package=PackageA Package=PackageB MapName=Map2 Package=PackageC Package=PackageD

Public function Virtual

void

 

Parse1ToNSectionOfStrings

(
    const TCHAR* Section,
    const TCHAR* KeyOne,
    const TCHAR* KeyN,
    TMap< FString, TArray< FString > > ...,
    const FString& Filename
)

Prases apart an ini section that contains a list of 1-to-N mappings of strings in the following format [PerMapPackages] MapName=Map1 Package=PackageA Package=PackageB MapName=Map2 Package=PackageC Package=PackageD

Public function

int32

 

Remove

(
    const FString& Filename
)

Public function

bool

 

RemoveKey

(
    const TCHAR* Section,
    const TCHAR* Key,
    const FString& Filename
)

Public function

void

 

SaveCurrentStateForBootstrap

(
    const TCHAR* Filename
)

Save the current config cache state into a file for bootstrapping other processes.

Public function

void

 

Serialize

(
    FArchive& Ar
)

Public function

void

 

SetArray

(
    const TCHAR* Section,
    const TCHAR* Key,
    const TArray< FString >& Value,
    const FString& Filename
)

Public function

void

 

SetBool

(
    const TCHAR* Section,
    const TCHAR* Key,
    bool Value,
    const FString& Filename
)

Public function

void

 

SetColor

(
    const TCHAR* Section,
    const TCHAR* Key,
    FColor Value,
    const FString& Filename
)

Public function

void

 

SetDouble

(
    const TCHAR* Section,
    const TCHAR* Key,
    double Value,
    const FString& Filename
)

Public function

void

 

SetFile

(
    const FString& InFilename,
    const FConfigFile* NewConfigFi...
)

Public function

void

 

SetFloat

(
    const TCHAR* Section,
    const TCHAR* Key,
    float Value,
    const FString& Filename
)

Public function Static

void

 

SetIniCacheSet

(
    const TSet< FString >* InIniCa...
)

Public function

void

 

SetInt

(
    const TCHAR* Section,
    const TCHAR* Key,
    int32 Value,
    const FString& Filename
)

Public function

void

 

SetRotator

(
    const TCHAR* Section,
    const TCHAR* Key,
    FRotator Value,
    const FString& Filename
)

Public function

void

 

SetSingleLineArray

(
    const TCHAR* Section,
    const TCHAR* Key,
    const TArray< FString >& In_Arr,
    const FString& Filename
)

Saves a "delimited" list of strings Saves a "delimited" list of strings

Public function

void

 

SetString

(
    const TCHAR* Section,
    const TCHAR* Key,
    const TCHAR* Value,
    const FString& Filename
)

Public function

void

 

SetText

(
    const TCHAR* Section,
    const TCHAR* Key,
    const FText& Value,
    const FString& Filename
)

Public function

void

 

SetVector

(
    const TCHAR* Section,
    const TCHAR* Key,
    FVector Value,
    const FString& Filename
)

Public function

void

 

SetVector2D

(
    const TCHAR* Section,
    const TCHAR* Key,
    FVector2D Value,
    const FString& Filename
)

Public function

void

 

SetVector4

(
    const TCHAR* Section,
    const TCHAR* Key,
    const FVector4& Value,
    const FString& Filename
)

Public function Virtual

void

 

ShowMemoryUsage

(
    FOutputDevice& Ar
)

Dumps memory stats for each file in the config cache to the specified archive.

Public function

void

 

UnloadFile

(
    const FString& Filename
)

Classes

Name

Description

Public struct

FKnownConfigFiles

Typedefs

Name

Description

Super

Constants

Name

Description

IniCacheSet

Deprecated Functions

Name Description

Public function

FConfigFile ...

 

Find

(
    const FString& Filename,
    bool CreateIfNotFound
)

CreateIfNotFound is deprecated, please use the overload without this parameter or FindConfigFile