Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
GeneratedTypeName.h File Reference
+ Include dependency graph for GeneratedTypeName.h:

Go to the source code of this file.

Classes

struct  UETypeName_Private::FSubstr
 
struct  UETypeName_Private::TCharArray< NumChars >
 

Namespaces

namespace  UETypeName_Private
 

Macros

#define SIG   __PRETTY_FUNCTION__
 
#define SIG_STARTCHAR   '='
 
#define SIG_ENDCHAR   ']'
 

Functions

template<typename T >
constexpr FSubstr UETypeName_Private::GetTypeSubstr ()
 
template<typename T , uint32... Indices>
constexpr TCharArray< sizeof...(Indices)> UETypeName_Private::TypeSubstrToCharArray (TIntegerSequence< uint32, Indices... >)
 
template<typename T >
const TCHARGetGeneratedTypeName ()
 

Macro Definition Documentation

◆ SIG

Definition at line 16 of file GeneratedTypeName.h.

◆ SIG_ENDCHAR

#define SIG_ENDCHAR   ']'

Definition at line 18 of file GeneratedTypeName.h.

◆ SIG_STARTCHAR

#define SIG_STARTCHAR   '='

Definition at line 17 of file GeneratedTypeName.h.

Function Documentation

◆ GetGeneratedTypeName()

template<typename T >
const TCHAR * GetGeneratedTypeName ( )
inline

Returns a pointer to a static string representing the name of the type, e.g.:

const TCHAR* FStringName = GetGeneratedTypeName<FString>() // "FString"

Caveats:

  • The strings are compiler-dependent and thus non-portable, and so shouldn't be saved or relied upon as a form of identity, e.g. the example above returns "class FString" on MSVC.
  • Default template parameters are also handled differently by different compilers, sometimes ignored, sometimes not.
  • Only the concrete type is known to the compiler, aliases are ignored, e.g. GetGeneratedTypeName<TCHAR>() typically returns "wchar_t".

Definition at line 111 of file GeneratedTypeName.h.