MCRO
C++23 utilities for Unreal Engine.
Loading...
Searching...
No Matches
Mcro::ArrayViews Namespace Reference

Functions

template<typename T , typename Allocator = FDefaultAllocator>
TArrayView< uint8 > MakeByteArrayViewFromTyped (TArray< T, Allocator > &array)
 
template<typename T , typename Allocator = FDefaultAllocator>
TArrayView< T > MakeTypedArrayViewFromBytes (TArray< uint8, Allocator > &array)
 

Function Documentation

◆ MakeByteArrayViewFromTyped()

template<typename T , typename Allocator = FDefaultAllocator>
TArrayView< uint8 > Mcro::ArrayViews::MakeByteArrayViewFromTyped ( TArray< T, Allocator > & array)

Makes a non-owning byte array view of the source typed array.

Template Parameters
TSource type
Allocator(optional) Array allocator
Parameters
arraySource array (going out of scope while working with the view will result in undefined behavior)
Returns
a non-owning byte array view of the source array

Definition at line 27 of file ArrayViews.h.

◆ MakeTypedArrayViewFromBytes()

template<typename T , typename Allocator = FDefaultAllocator>
TArrayView< T > Mcro::ArrayViews::MakeTypedArrayViewFromBytes ( TArray< uint8, Allocator > & array)

Makes a non-owning typed array view of the source byte array.

Template Parameters
TDestination type
Allocator(optional) Array allocator
Parameters
arraySource array (going out of scope while working with the view will result in undefined behavior)
Returns
a non-owning typed array view of the source array

Definition at line 43 of file ArrayViews.h.