#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 |
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
using AZ::Settings::TextParserSettings::ParseTextEntryFunc = AZStd::function<bool(AZStd::string_view token)> |
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')
using AZ::Settings::TextParserSettings::TokenDelimiterFunc = AZStd::function<bool(char element)> |
Token Delimiter which determines a token from a text file The default token delimiter is a linefeed '
'
|
static |
Returns if the character matches the linefeed character
element | character being checked |
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)
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