FConfigFile

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Core

Header

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

Include

#include "Misc/ConfigCacheIni.h"

Syntax

class FConfigFile : public TMap< FString, FConfigSection >

Variables

Name Description

Public variable

FString

 

CacheKey

Key to the cache to speed up ini parsing

Public variable

TArray< FConfig...

 

CommandlineOptions

The collection of overrides which stemmed from the commandline

Public variable

bool

 

Dirty

Public variable

FName

 

Name

The name of this config file

Public variable

bool

 

NoSave

Public variable

FConfigFile ...

 

SourceConfigFile

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

Public variable

FString

 

SourceEngineConfigDir

Locations where this file may have come from - used to merge with non-standard ini locations.

Public variable

FConfigFileHier...

 

SourceIniHierarchy

The collection of source files which were used to generate this file.

Public variable

FString

 

SourceProjectConfigDir

Constructors

Name Description

Public function

FConfigFile()

Public function

FConfigFile

(
    int32
)

Destructors

Name Description

Public function

~FConfigFile()

Functions

Name Description

Public function

void

 

AddDynamicLayerToHeirarchy

(
    const FString& Filename
)

Appends a new INI file to the SourceIniHierarchy and combines it

Public function

void

 

AddMissingProperties

(
    const FConfigFile& InSourceFile
)

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

Public function

bool

 

Combine

(
    const FString& Filename
)

Public function

void

 

CombineFromBuffer

(
    const FString& Buffer
)

Public function

void

 

Dump

(
    FOutputDevice& Ar
)

Public function

FConfigSecti...

 

FindOrAddSection

(
    const FString& Name
)

Looks for a section by name, and creates an empty one if it can't be found

Public function Static

FString

 

GenerateExportedPropertyLine

(
    const FString& PropertyName,
    const FString& PropertyValue
)

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

Public function Const

int32

 

GetArray

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

Public function Const

bool

 

GetBool

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

Public function Const

bool

 

GetFloat

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

Public function Const

bool

 

GetInt

(
    const TCHAR* Section,
    const TCHAR* Key,
    int& Value
)

Public function Const

bool

 

GetInt64

(
    const TCHAR* Section,
    const TCHAR* Key,
    int64& Value
)

Public function Const

bool

 

GetString

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

Public function Const

bool

 

GetText

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

Public function Static

void

 

OverrideFileFromCommandline

(
    FString& Filename
)

Checks the command line for any overridden config file settings

Public function Static

void

 

OverrideFromCommandline

(
    FConfigFile* File,
    const FString& Filename
)

Checks the command line for any overridden config settings

Public function

void

 

ProcessInputFileContents

(
    const FString& Contents
)

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

Public function

void

 

ProcessSourceAndCheckAgainstBackup()

Check the source hierarchy which was loaded without any user changes from the Config/Saved dir.

Public function

void

 

Read

(
    const FString& Filename
)

Public function

void

 

SetInt64

(
    const TCHAR* Section,
    const TCHAR* Key,
    const int64 Value
)

Public function

void

 

SetString

(
    const TCHAR* Section,
    const TCHAR* Key,
    const TCHAR* Value
)

Public function

void

 

SetText

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

Public function Static

bool

 

ShouldExportQuotedString

(
    const FString& PropertyValue
)

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

Public function

void

 

UpdateSections

(
    const TCHAR* DiskFilename,
    const TCHAR* IniRootName,
    const TCHAR* OverridePlatform
)

Saves only the sections in this FConfigFile into the given file.

Public function

bool

 

UpdateSinglePropertyInSection

(
    const TCHAR* DiskFilename,
    const TCHAR* PropertyName,
    const TCHAR* SectionName
)

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

Public function

bool

 

Write

(
    const FString& Filename,
    bool bDoRemoteWrite,
    const FString& PrefixText
)

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

Public function

bool

 

Write

(
    const FString& Filename,
    bool bDoRemoteWrite,
    TMap< FString, FString >& InOutSec...,
    const TArray< FString >& InSection...
)

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

Operators

Name Description

Public function Const

bool

 

operator!=

(
    const FConfigFile& Other
)

Public function Const

bool

 

operator==

(
    const FConfigFile& Other
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss