Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::SettingsRegistryMergeUtils::ConfigParserSettings Struct Reference

#include <SettingsRegistryMergeUtils.h>

Public Types

enum class  FileReaderClass { UseFileIOIfAvailableFallbackToSystemFile , UseSystemFileOnly , UseFileIOOnly }
 enumeration to indicate if AZ::IO::FileIOBase should be used to open the config file over AZ::IO::SystemFile
 
using CommentPrefixFunc = AZStd::function< AZStd::string_view(AZStd::string_view line)>
 
using SectionHeaderFunc = AZStd::function< AZStd::string_view(AZStd::string_view line)>
 

Static Public Member Functions

static AZStd::string_view DefaultCommentPrefixFilter (AZStd::string_view line)
 
static AZStd::string_view DefaultSectionHeaderFilter (AZStd::string_view line)
 

Public Attributes

AZStd::string_view m_registryRootPointerPath
 
CommentPrefixFunc m_commentPrefixFunc = &DefaultCommentPrefixFilter
 
SectionHeaderFunc m_sectionHeaderFunc = &DefaultSectionHeaderFilter
 
SettingsRegistryInterface::CommandLineArgumentSettings m_commandLineSettings
 
FileReaderClass m_fileReaderClass = FileReaderClass::UseFileIOIfAvailableFallbackToSystemFile
 

Detailed Description

Settings structure which is used to determine how to parse Windows INI style config file(.cfg, .ini, etc...) It supports being able to supply a custom comment filter and section header filter The names of section headers are appended to the root Json pointer path member to form new root paths

Member Typedef Documentation

◆ CommentPrefixFunc

Callback function that is invoked when a line is read. returns a substr of the line which contains the non-commented portion of the line

◆ SectionHeaderFunc

Callback function that is after a has been filtered through the CommentPrefixFunc to determine if the text matches a section header returns a view of the section name if the line contains a section Otherwise an empty view is returned

Member Data Documentation

◆ m_commandLineSettings

SettingsRegistryInterface::CommandLineArgumentSettings AZ::SettingsRegistryMergeUtils::ConfigParserSettings::m_commandLineSettings

structure which is forwarded to the SettingsRegistryInterface MergeCommandLineArgument function The structure contains a functor which returns true if a character is a valid delimiter

◆ m_commentPrefixFunc

CommentPrefixFunc AZ::SettingsRegistryMergeUtils::ConfigParserSettings::m_commentPrefixFunc = &DefaultCommentPrefixFilter

Function which is invoked to retrieve the non-commented section of a line The input line will never start with leading whitespace

◆ m_registryRootPointerPath

AZStd::string_view AZ::SettingsRegistryMergeUtils::ConfigParserSettings::m_registryRootPointerPath

Root JSON pointer path to place all key=values pairs of configuration data within Any section headers found within the config file is appended to the root pointer path when merging the key=value pairs until another section header is found

◆ m_sectionHeaderFunc

SectionHeaderFunc AZ::SettingsRegistryMergeUtils::ConfigParserSettings::m_sectionHeaderFunc = &DefaultSectionHeaderFilter

Invoked on the non-commented section of a line that has been read from the config file This function should examine the supplied line to determine if it matches a section header If so the section name should be returned Any sections names returned will be used to root any new <key, value> entries into the settings registry


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