Stream Chat Unreal SDK
Loading...
Searching...
No Matches
Util Namespace Reference

Helpers for DTO conversion. More...

Functions

template<typename OutT , typename InT >
FORCEINLINE OutT Convert (const InT &Input)
 Map from one type to an another using direct initialization.
 
template<typename OutT , typename InT , typename... TArgs>
FORCEINLINE OutT Convert (const InT &Input, TArgs... Args)
 Map from one type to an another using a constructor + additional arguments.
 
template<typename OutT , typename InT >
FORCEINLINE TOptional< OutT > Convert (const TOptional< InT > &Input)
 Map from an optional of one type to an optional of another using direct initialization.
 
template<typename OutT , typename InT >
FORCEINLINE TOptional< OutT > Convert (const InT *Input)
 Map from an pointer of one type to an optional of another using direct initialization.
 
template<typename OutT , typename InT >
FORCEINLINE TOptional< TArray< OutT > > Convert (const TOptional< TArray< InT > > &Input)
 Map from an optional array of one type to an optional array of another using direct initialization.
 
template<typename OutT , typename InT >
FORCEINLINE TArray< OutT > Convert (const TArray< InT > &Input)
 Map from an array of one type to an array of another using its direct initialization.
 
template<typename OutT , typename InT , typename... TArgs>
FORCEINLINE TArray< OutT > Convert (const TArray< InT > &Input, TArgs... Args)
 Map from an array of one type to an array of another using a constructor and any other arguments.
 

Detailed Description

Helpers for DTO conversion.

To use these, define either: a converting constructor (https://en.cppreference.com/w/cpp/language/converting_constructor), or a user-defined conversion function (https://en.cppreference.com/w/cpp/language/cast_operator)