Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FDefaultValueHelper Class Reference

#include <DefaultValueHelper.h>

Static Public Member Functions

static FString GetUnqualifiedEnumValue (const FString &Source)
 
static bool HasWhitespaces (const FString &Source)
 
static FString RemoveWhitespaces (const FString &Source)
 
static bool GetParameters (const FString &Source, const FString &TypeName, FString &OutForm)
 
static bool Is (const FString &Source, const TCHAR *CompareStr)
 
static bool StringFromCppString (const FString &Source, const FString &TypeName, FString &OutForm)
 
static bool IsStringValidInteger (const FString &Source)
 
static bool IsStringValidFloat (const FString &Source)
 
static bool IsStringValidVector (const FString &Source)
 
static bool IsStringValidRotator (const FString &Source)
 
static bool IsStringValidLinearColor (const FString &Source)
 
static bool ParseInt (const FString &Source, int32 &OutVal)
 
static bool ParseInt64 (const FString &Source, int64 &OutVal)
 
static bool ParseFloat (const FString &Source, float &OutVal)
 
static bool ParseDouble (const FString &Source, double &OutVal)
 
static bool ParseVector (const FString &Source, FVector3f &OutVal)
 
static bool ParseVector (const FString &Source, FVector3d &OutVal)
 
static bool ParseVector2D (const FString &Source, FVector2f &OutVal)
 
static bool ParseVector2D (const FString &Source, FVector2d &OutVal)
 
static bool ParseVector4 (const FString &Source, FVector4f &OutVal)
 
static bool ParseVector4 (const FString &Source, FVector4d &OutVal)
 
static bool ParseRotator (const FString &Source, FRotator3f &OutVal)
 
static bool ParseRotator (const FString &Source, FRotator3d &OutVal)
 
static bool ParseLinearColor (const FString &Source, FLinearColor &OutVal)
 
static bool ParseColor (const FString &Source, FColor &OutVal)
 

Static Private Member Functions

static TCHAR TS (const TCHAR *Sign)
 
static bool IsWhitespace (TCHAR Char)
 
static bool Trim (int32 &Pos, const FString &Source)
 
static const TCHAR * StartOf (const FString &Source)
 
static const TCHAR * EndOf (const FString &Source)
 
static bool Trim (const TCHAR *&Start, const TCHAR *End)
 
static bool IsStringValidFloat (const TCHAR *Start, const TCHAR *End)
 
static bool IsStringValidInteger (const TCHAR *Start, const TCHAR *End, int32 &OutBase)
 
static bool IsStringValidInteger (const TCHAR *Start, const TCHAR *End)
 

Detailed Description

Definition at line 17 of file DefaultValueHelper.h.

Member Function Documentation

◆ EndOf()

static const TCHAR * FDefaultValueHelper::EndOf ( const FString & Source)
staticprivate

returns address of the last (empty) char in the string

◆ GetParameters()

static bool FDefaultValueHelper::GetParameters ( const FString & Source,
const FString & TypeName,
FString & OutForm )
static

Shell parameters list: " TypeName ( A a, B b ) " -> "A a, B b"

◆ GetUnqualifiedEnumValue()

static FString FDefaultValueHelper::GetUnqualifiedEnumValue ( const FString & Source)
static

◆ HasWhitespaces()

static bool FDefaultValueHelper::HasWhitespaces ( const FString & Source)
static

◆ Is()

static bool FDefaultValueHelper::Is ( const FString & Source,
const TCHAR * CompareStr )
static

returns if given strings are equal, ignores initial and final white spaces in Source

◆ IsStringValidFloat() [1/2]

static bool FDefaultValueHelper::IsStringValidFloat ( const FString & Source)
static

◆ IsStringValidFloat() [2/2]

static bool FDefaultValueHelper::IsStringValidFloat ( const TCHAR * Start,
const TCHAR * End )
staticprivate
Parameters
Start- address of the first symbol of the checked string
End- address of the first symbol after of the checked string (also address of the terminating empty symbol)

◆ IsStringValidInteger() [1/3]

static bool FDefaultValueHelper::IsStringValidInteger ( const FString & Source)
static

◆ IsStringValidInteger() [2/3]

static bool FDefaultValueHelper::IsStringValidInteger ( const TCHAR * Start,
const TCHAR * End )
staticprivate

◆ IsStringValidInteger() [3/3]

static bool FDefaultValueHelper::IsStringValidInteger ( const TCHAR * Start,
const TCHAR * End,
int32 & OutBase )
staticprivate

return if the string can be parse to an int. OutBase is the base of the integer (8, 10, 16)

◆ IsStringValidLinearColor()

static bool FDefaultValueHelper::IsStringValidLinearColor ( const FString & Source)
static

accepted form: " %f, %f, %f " or " %f, %f, %f, %f " (alpha is optional)

◆ IsStringValidRotator()

static bool FDefaultValueHelper::IsStringValidRotator ( const FString & Source)
static

accepted form: " %f, %f, %f"

◆ IsStringValidVector()

static bool FDefaultValueHelper::IsStringValidVector ( const FString & Source)
static

accepted form: " %f, %f, %f"

◆ IsWhitespace()

static bool FDefaultValueHelper::IsWhitespace ( TCHAR Char)
staticprivate

◆ ParseColor()

static bool FDefaultValueHelper::ParseColor ( const FString & Source,
FColor & OutVal )
static

Converts a string into a FLinearColor. Accepted forms: " %d, %d, %d " or " %d, %d, %d, %d " (alpha is optional).

Parameters
Sourcethe input string to try to convert
OutValthe output color
Returns
true if the conversion happened, false otherwise

◆ ParseDouble()

static bool FDefaultValueHelper::ParseDouble ( const FString & Source,
double & OutVal )
static

Converts a string into a double.

Parameters
Sourcethe input string to try to convert
OutValthe output double
Returns
true if the conversion happened, false otherwise

◆ ParseFloat()

static bool FDefaultValueHelper::ParseFloat ( const FString & Source,
float & OutVal )
static

Converts a string into a float.

Parameters
Sourcethe input string to try to convert
OutValthe output float
Returns
true if the conversion happened, false otherwise

◆ ParseInt()

static bool FDefaultValueHelper::ParseInt ( const FString & Source,
int32 & OutVal )
static

Converts a string into a int32.

Parameters
Sourcethe input string to try to convert
OutValthe output integer
Returns
true if the conversion happened, false otherwise

◆ ParseInt64()

static bool FDefaultValueHelper::ParseInt64 ( const FString & Source,
int64 & OutVal )
static

Converts a string into a int64.

Parameters
Sourcethe input string to try to convert
OutValthe output integer
Returns
true if the conversion happened, false otherwise

◆ ParseLinearColor()

static bool FDefaultValueHelper::ParseLinearColor ( const FString & Source,
FLinearColor & OutVal )
static

Converts a string into a FLinearColor. Accepted forms: " %f, %f, %f " or " %f, %f, %f, %f " (alpha is optional).

Parameters
Sourcethe input string to try to convert
OutValthe output color
Returns
true if the conversion happened, false otherwise

◆ ParseRotator() [1/2]

static bool FDefaultValueHelper::ParseRotator ( const FString & Source,
FRotator3d & OutVal )
static

◆ ParseRotator() [2/2]

static bool FDefaultValueHelper::ParseRotator ( const FString & Source,
FRotator3f & OutVal )
static

Converts a string into a FRotator. Accepted form: " %f, %f, %f "

Parameters
Sourcethe input string to try to convert
OutValthe output rotator
Returns
true if the conversion happened, false otherwise

◆ ParseVector() [1/2]

static bool FDefaultValueHelper::ParseVector ( const FString & Source,
FVector3d & OutVal )
static

◆ ParseVector() [2/2]

static bool FDefaultValueHelper::ParseVector ( const FString & Source,
FVector3f & OutVal )
static

Converts a string into a FVector. Accepted form: " %f, %f, %f "

Parameters
Sourcethe input string to try to convert
OutValthe output vector
Returns
true if the conversion happened, false otherwise

◆ ParseVector2D() [1/2]

static bool FDefaultValueHelper::ParseVector2D ( const FString & Source,
FVector2d & OutVal )
static

◆ ParseVector2D() [2/2]

static bool FDefaultValueHelper::ParseVector2D ( const FString & Source,
FVector2f & OutVal )
static

Converts a string into a FVector. Accepted form: " %f, %f "

Parameters
Sourcethe input string to try to convert
OutValthe output vector2D
Returns
true if the conversion happened, false otherwise

◆ ParseVector4() [1/2]

static bool FDefaultValueHelper::ParseVector4 ( const FString & Source,
FVector4d & OutVal )
static

◆ ParseVector4() [2/2]

static bool FDefaultValueHelper::ParseVector4 ( const FString & Source,
FVector4f & OutVal )
static

Converts a string into a FVector4. Accepted form: " %f, %f, %f, %f "

Parameters
Sourcethe input string to try to convert
OutValthe output vector4
Returns
true if the conversion happened, false otherwise

◆ RemoveWhitespaces()

static FString FDefaultValueHelper::RemoveWhitespaces ( const FString & Source)
static

◆ StartOf()

static const TCHAR * FDefaultValueHelper::StartOf ( const FString & Source)
staticprivate

returns address of the first char in the string

◆ StringFromCppString()

static bool FDefaultValueHelper::StringFromCppString ( const FString & Source,
const FString & TypeName,
FString & OutForm )
static

source forms: TypeName( TEXT ("ABC") ), TEXT("ABC"), TypeName("ABC"), "ABC" output form: ABC

◆ Trim() [1/2]

static bool FDefaultValueHelper::Trim ( const TCHAR *& Start,
const TCHAR * End )
staticprivate

advances Pos to first non-whitespace symbol returns if some non-Whitespace sign remains in string

◆ Trim() [2/2]

static bool FDefaultValueHelper::Trim ( int32 & Pos,
const FString & Source )
staticprivate

advances Pos to first non-whitespace symbol returns if some non-Whitespace sign remains in string

◆ TS()

static TCHAR FDefaultValueHelper::TS ( const TCHAR * Sign)
staticprivate

Something like TEXT macro for chars is needed


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