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::Settings::TextParserSettings Struct Reference

#include <TextParser.h>

Public Types

using ParseTextEntryFunc = AZStd::function< bool(AZStd::string_view token)>
 
using TokenDelimiterFunc = AZStd::function< bool(char element)>
 

Static Public Member Functions

static bool DefaultTokenDelimiterFunc (char element)
 

Public Attributes

ParseTextEntryFunc m_parseTextEntryFunc
 
TokenDelimiterFunc m_tokenDelimiterFunc = &DefaultTokenDelimiterFunc
 Callback function which is invoked to determine the end of the text entry.
 
bool m_invokeParseTextEntryForEmptyLine = false
 

Detailed Description

Settings structure for parsing a text file. By default the user supplied ParseTextEntryFunc callback is invoked for every line parsed The TokenDelimiterFunc can be modified to change the token used to determine a text entry For example if the TokenDelimiterFunc returns true of '\0', then every time a NUL delimited blob is found the ParseTextEntryFunc will be invoked

Member Typedef Documentation

◆ ParseTextEntryFunc

Function which is invoked for each "text entry" of the text file A text entry is determined as a block of text delimited by the result of the TokenDelimiterFunc By default a "text entry" is line based, but other delimiters can be used such as NUL('\0')

◆ TokenDelimiterFunc

Token Delimiter which determines a token from a text file The default token delimiter is a linefeed '
'

Member Function Documentation

◆ DefaultTokenDelimiterFunc()

static bool AZ::Settings::TextParserSettings::DefaultTokenDelimiterFunc ( char  element)
static

Returns if the character matches the linefeed character

Parameters
elementcharacter being checked
Returns
true if the character matches line feed

Member Data Documentation

◆ m_invokeParseTextEntryForEmptyLine

bool AZ::Settings::TextParserSettings::m_invokeParseTextEntryForEmptyLine = false

If set to true, the ParseTextEntryFunc callback will be invoked even when the empty text is empty("line" size = 0)

◆ m_parseTextEntryFunc

ParseTextEntryFunc AZ::Settings::TextParserSettings::m_parseTextEntryFunc

Callback function which is invoked for each text entry found in the text file This is only required member that needs to be set for the TextParserSettings


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