Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TStringPointer< InFromType, InToType > Class Template Reference

#include <StringConv.h>

Public Types

typedef InFromType FromType
 
typedef InToType ToType
 

Public Member Functions

template<typename SrcBufferType , std::enable_if_t< TIsCharEncodingCompatibleWith_V< SrcBufferType, FromType > > * = nullptr>
 TStringPointer (const SrcBufferType *Source)
 
template<typename SrcBufferType , std::enable_if_t< TIsCharEncodingCompatibleWith_V< SrcBufferType, FromType > > * = nullptr>
 TStringPointer (const SrcBufferType *Source, int32 SourceLen)
 
template<typename FromRangeType , typename FromRangeCharType = std::remove_cv_t<std::remove_pointer_t<decltype(GetData(DeclVal<FromRangeType>()))>, std::enable_if_t< TAnd< TIsContiguousContainer< FromRangeType >, TNot< TIsArray< typename TRemoveReference< FromRangeType >::Type > >, TIsCharEncodingCompatibleWith< FromRangeCharType, FromType > >::Value > * = nullptr>
 TStringPointer (FromRangeType &&Source)
 
 TStringPointer (TStringPointer &&Other)=default
 
FORCEINLINE const ToTypeGet () const UE_LIFETIMEBOUND
 
FORCEINLINE int32 Length () const
 

Private Member Functions

 TStringPointer (const TStringPointer &)=delete
 
TStringPointeroperator= (const TStringPointer &)=delete
 

Private Attributes

const ToTypePtr
 
int32 StringLength
 

Detailed Description

template<typename InFromType, typename InToType = InFromType>
class TStringPointer< InFromType, InToType >

Class takes one type of string and and stores it as-is. For API compatibility with TStringConversion when the To and From types are already in the same format.

Definition at line 807 of file StringConv.h.

Member Typedef Documentation

◆ FromType

Definition at line 812 of file StringConv.h.

◆ ToType

Definition at line 813 of file StringConv.h.

Constructor & Destructor Documentation

◆ TStringPointer() [1/5]

template<typename InFromType , typename InToType = InFromType>
template<typename SrcBufferType , std::enable_if_t< TIsCharEncodingCompatibleWith_V< SrcBufferType, FromType > > * = nullptr>
TStringPointer< InFromType, InToType >::TStringPointer ( const SrcBufferType * Source)
inlineexplicit

Definition at line 820 of file StringConv.h.

◆ TStringPointer() [2/5]

template<typename InFromType , typename InToType = InFromType>
template<typename SrcBufferType , std::enable_if_t< TIsCharEncodingCompatibleWith_V< SrcBufferType, FromType > > * = nullptr>
TStringPointer< InFromType, InToType >::TStringPointer ( const SrcBufferType * Source,
int32 SourceLen )
inline

Definition at line 838 of file StringConv.h.

◆ TStringPointer() [3/5]

template<typename InFromType , typename InToType = InFromType>
template<typename FromRangeType , typename FromRangeCharType = std::remove_cv_t<std::remove_pointer_t<decltype(GetData(DeclVal<FromRangeType>()))>, std::enable_if_t< TAnd< TIsContiguousContainer< FromRangeType >, TNot< TIsArray< typename TRemoveReference< FromRangeType >::Type > >, TIsCharEncodingCompatibleWith< FromRangeCharType, FromType > >::Value > * = nullptr>
TStringPointer< InFromType, InToType >::TStringPointer ( FromRangeType && Source)
inline

Construct from a compatible character range such as TStringView or TStringBuilder.

Definition at line 872 of file StringConv.h.

◆ TStringPointer() [4/5]

Move constructor

◆ TStringPointer() [5/5]

Member Function Documentation

◆ Get()

template<typename InFromType , typename InToType = InFromType>
FORCEINLINE const ToType * TStringPointer< InFromType, InToType >::Get ( ) const
inline

Accessor for the string.

Note
The string may not be null-terminated if constructed from an explicitly sized buffer that didn't include the null-terminator.
Setting to UE_LIFETIMEBOUND even though TStringPointer doesn't own the pointer, because we want StringCast to give consistent warnings no matter what implementation choice it makes
Returns
A const pointer to the string.

Definition at line 889 of file StringConv.h.

◆ Length()

template<typename InFromType , typename InToType = InFromType>
FORCEINLINE int32 TStringPointer< InFromType, InToType >::Length ( ) const
inline

Length of the string.

Returns
The number of characters in the string, excluding any null terminator.

Definition at line 899 of file StringConv.h.

◆ operator=()

Member Data Documentation

◆ Ptr

template<typename InFromType , typename InToType = InFromType>
const ToType* TStringPointer< InFromType, InToType >::Ptr
private

Definition at line 909 of file StringConv.h.

◆ StringLength

template<typename InFromType , typename InToType = InFromType>
int32 TStringPointer< InFromType, InToType >::StringLength
private

Definition at line 910 of file StringConv.h.


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