Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FeedbackContextMarkup.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Containers/UnrealString.h"
6#include "CoreFwd.h"
7#include "CoreTypes.h"
8
10class FText;
11
12/**
13 * A text-based markup language can be used to allow external processes to control the state
14 * machine, allowing command-line utilities to give graphical user feedback.
15 *
16 * Example markup:
17 *
18 * Update the progress of the current operation:
19 * @progress 10/20
20 * @progress 50%
21 *
22 * Update the progress and set a status message for the current operation:
23 * @progress 'Compiling source code...' 50%
24 */
26{
27public:
28
29 /** Markup stack manipulation. */
30 static bool ParseCommand(const FString& Line, FFeedbackContext* Warn);
31
32 /** Utility functions for dealing with external processes. */
33 static bool PipeProcessOutput(const FText& Description, const FString& URL, const FString& Params, FFeedbackContext* Warn, int32* OutExitCode);
34
35private:
36
37 /** Try to read a single exact-match token from the input stream. Must be followed by whitespace or EOL. */
38 static bool ReadToken(const TCHAR *&Text, const TCHAR *Token);
39
40 /** Read a progress value from the input stream. Valid forms are <Numerator>/<Denominator> or <Value>% */
41 static bool ReadProgress(const TCHAR *&Text, int32 &OutNumerator, int32 &OutDenominator);
42
43 /** Read an integer from the input stream */
44 static bool ReadInteger(const TCHAR *&Text, uint32 &OutInteger);
45
46 /** Read a string from the input stream */
47 static bool ReadString(const TCHAR *&Text, FString &OutString);
48
49 /** Skip over a sequence of whitespace characters in the input stream and returns a pointer to the next character */
50 static const TCHAR *SkipWhitespace(const TCHAR *Text);
51};
static bool ParseCommand(const FString &Line, FFeedbackContext *Warn)
static bool ReadProgress(const TCHAR *&Text, int32 &OutNumerator, int32 &OutDenominator)
static bool ReadInteger(const TCHAR *&Text, uint32 &OutInteger)
static bool PipeProcessOutput(const FText &Description, const FString &URL, const FString &Params, FFeedbackContext *Warn, int32 *OutExitCode)
static bool ReadString(const TCHAR *&Text, FString &OutString)
static bool ReadToken(const TCHAR *&Text, const TCHAR *Token)
static const TCHAR * SkipWhitespace(const TCHAR *Text)
Definition Text.h:357