Navigation
API > API/Runtime > API/Runtime/Core
A token stream wraps up a raw string, providing accessors into it for consuming tokens
| Name | TTokenStream |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Misc/ExpressionParserTypes.h |
| Include Path | #include "Misc/ExpressionParserTypes.h" |
Syntax
template<typename CharType>
class TTokenStream
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TTokenStream
(
const CharType* In |
Constructor. The stream is only valid for the lifetime of the string provided | Misc/ExpressionParserTypes.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| End | const CharType * | The end of the expression | Misc/ExpressionParserTypes.h | |
| ReadPos | const CharType * | The current read position in the expression | Misc/ExpressionParserTypes.h | |
| Start | const CharType * | The start of the expression | Misc/ExpressionParserTypes.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 CharsRemaining() |
Get the number of characters remaining in the stream after the current read position | Misc/ExpressionParserTypes.h | |
TOptional< TStringToken< CharType > > GenerateToken
(
int32 NumChars, |
Generate a token for the specified number of chars, at the current read position (or end of Accumulate) | Misc/ExpressionParserTypes.h | |
const CharType * GetEnd() |
Misc/ExpressionParserTypes.h | ||
FString GetErrorContext() |
Get the error context from the current read position | Misc/ExpressionParserTypes.h | |
int32 GetPosition() |
Get the current read position from the start of the stream | Misc/ExpressionParserTypes.h | |
const CharType * GetRead() |
Misc/ExpressionParserTypes.h | ||
const CharType * GetStart() |
Misc/ExpressionParserTypes.h | ||
bool IsEmpty() |
Check if the stream is empty | Misc/ExpressionParserTypes.h | |
bool IsReadPosValid
(
const CharType* InPos, |
Check if it is valid to read (the optional number of characters) from the specified position | Misc/ExpressionParserTypes.h | |
TOptional< TStringToken< CharType > > ParseSymbol
(
TStringToken< CharType >* Accumulate |
Return a string token for the next character in the stream (or accumulating into the specified existing token) | Misc/ExpressionParserTypes.h | |
TOptional< TStringToken< CharType > > ParseSymbol
(
CharType Symbol, |
Attempt parse out the specified pre-defined string from the current read position (or accumulating into the specified existing token) | Misc/ExpressionParserTypes.h | |
TOptional< TStringToken< CharType > > ParseToken
(
TFunctionRef< EParseState(CharType)> Pred, |
Parse out a token using the supplied predicate. | Misc/ExpressionParserTypes.h | |
TOptional< TStringToken< CharType > > ParseToken
(
const CharType* Symbol, |
Attempt parse out the specified pre-defined string from the current read position (or accumulating into the specified existing token) | Misc/ExpressionParserTypes.h | |
TOptional< TStringToken< CharType > > ParseTokenIgnoreCase
(
const CharType* Symbol, |
Misc/ExpressionParserTypes.h | ||
TOptional< TStringToken< CharType > > ParseWhitespace
(
TStringToken< CharType >* Accumulate |
Parse a whitespace token | Misc/ExpressionParserTypes.h | |
CharType PeekChar
(
int32 Offset |
Peek at the character at the specified offset from the current read position | Misc/ExpressionParserTypes.h | |
void SetReadPos
(
const TStringToken< CharType >& Token |
Set the current read position to the character proceeding the specified token | Misc/ExpressionParserTypes.h |