|
| constexpr | TArrayView (const TArrayView &)=default |
| |
| TArrayView & | operator= (const TArrayView &)=default |
| |
| | ~TArrayView ()=default |
| |
| constexpr | TArrayView () |
| |
| template<typename OtherRangeType , typename CVUnqualifiedOtherRangeType = std::remove_cv_t<std::remove_reference_t<OtherRangeType>> UE_REQUIRES( TAnd< TIsContiguousContainer<CVUnqualifiedOtherRangeType>, TOr< TIsCompatibleRangeType<OtherRangeType>, TIsReinterpretableRangeType<OtherRangeType> > >::Value && TIsTArrayView_V<CVUnqualifiedOtherRangeType> && !std::is_same_v<CVUnqualifiedOtherRangeType, TArrayView> )> |
| constexpr | TArrayView (OtherRangeType &&Other) |
| |
| template<typename OtherRangeType , typename CVUnqualifiedOtherRangeType = std::remove_cv_t<std::remove_reference_t<OtherRangeType>> UE_REQUIRES( TAnd< TIsContiguousContainer<CVUnqualifiedOtherRangeType>, TOr< TIsCompatibleRangeType<OtherRangeType>, TIsReinterpretableRangeType<OtherRangeType> > >::Value && !TIsTArrayView_V<CVUnqualifiedOtherRangeType> )> |
| constexpr | TArrayView (OtherRangeType &&Other UE_LIFETIMEBOUND) |
| |
| template<typename OtherElementType > |
| constexpr | TArrayView (OtherElementType *InData UE_LIFETIMEBOUND, SizeType InCount) |
| |
| constexpr | TArrayView (std::initializer_list< ElementType > List UE_LIFETIMEBOUND) |
| |
| constexpr | TArrayView (FIntrusiveUnsetOptionalState) |
| |
| constexpr bool | UEOpEquals (FIntrusiveUnsetOptionalState) const |
| |
| UE_FORCEINLINE_HINT constexpr ElementType * | GetData () const |
| |
| UE_FORCEINLINE_HINT constexpr void | CheckInvariants () const |
| |
| constexpr void | RangeCheck (SizeType Index) const |
| |
| constexpr void | SliceRangeCheck (SizeType Index, SizeType InNum) const |
| |
| UE_FORCEINLINE_HINT constexpr bool | IsValidIndex (SizeType Index) const |
| |
| constexpr bool | IsEmpty () const |
| |
| UE_FORCEINLINE_HINT constexpr SizeType | Num () const |
| |
| UE_FORCEINLINE_HINT constexpr SIZE_T | NumBytes () const |
| |
| constexpr ElementType & | operator[] (SizeType Index) const |
| |
| constexpr ElementType & | Last (SizeType IndexFromTheEnd=0) const |
| |
| constexpr TArrayView | Slice (SizeType Index, SizeType InNum) const |
| |
| constexpr TArrayView | Left (SizeType Count) const |
| |
| constexpr TArrayView | LeftChop (SizeType Count) const |
| |
| constexpr TArrayView | Right (SizeType Count) const |
| |
| constexpr TArrayView | RightChop (SizeType Count) const |
| |
| constexpr TArrayView | Mid (SizeType Index, SizeType Count=TNumericLimits< SizeType >::Max()) const |
| |
| constexpr void | LeftInline (SizeType CharCount) |
| |
| constexpr void | LeftChopInline (SizeType CharCount) |
| |
| constexpr void | RightInline (SizeType CharCount) |
| |
| constexpr void | RightChopInline (SizeType CharCount) |
| |
| constexpr void | MidInline (SizeType Position, SizeType CharCount=TNumericLimits< SizeType >::Max()) |
| |
| constexpr bool | Find (const ElementType &Item, SizeType &Index) const |
| |
| constexpr SizeType | Find (const ElementType &Item) const |
| |
| constexpr bool | FindLast (const ElementType &Item, SizeType &Index) const |
| |
| constexpr SizeType | FindLast (const ElementType &Item) const |
| |
| template<typename Predicate > |
| constexpr SizeType | FindLastByPredicate (Predicate Pred, SizeType StartIndex) const |
| |
| template<typename Predicate > |
| UE_FORCEINLINE_HINT constexpr SizeType | FindLastByPredicate (Predicate Pred) const |
| |
| template<typename KeyType > |
| constexpr SizeType | IndexOfByKey (const KeyType &Key) const |
| |
| template<typename Predicate > |
| constexpr SizeType | IndexOfByPredicate (Predicate Pred) const |
| |
| template<typename KeyType > |
| constexpr ElementType * | FindByKey (const KeyType &Key) const |
| |
| template<typename Predicate > |
| constexpr ElementType * | FindByPredicate (Predicate Pred) const |
| |
| template<typename Predicate > |
| constexpr TArray< std::remove_const_t< ElementType > > | FilterByPredicate (Predicate Pred) const |
| |
| template<typename ComparisonType > |
| constexpr bool | Contains (const ComparisonType &Item) const |
| |
| template<typename Predicate > |
| UE_FORCEINLINE_HINT constexpr bool | ContainsByPredicate (Predicate Pred) const |
| |
| UE_FORCEINLINE_HINT constexpr ElementType * | begin () const |
| |
| UE_FORCEINLINE_HINT constexpr ElementType * | end () const |
| |
| UE_FORCEINLINE_HINT constexpr TReversePointerIterator< ElementType > | rbegin () const |
| |
| UE_FORCEINLINE_HINT constexpr TReversePointerIterator< ElementType > | rend () const |
| |
| constexpr void | Sort () |
| |
| template<class PREDICATE_CLASS > |
| constexpr void | Sort (const PREDICATE_CLASS &Predicate) |
| |
| constexpr void | StableSort () |
| |
| template<class PREDICATE_CLASS > |
| constexpr void | StableSort (const PREDICATE_CLASS &Predicate) |
| |
| template<typename OtherElementType , typename OtherSizeType > |
| bool | UEOpEquals (TArrayView< OtherElementType, OtherSizeType >) const =delete |
| |
template<typename RangeType >
requires (std::is_convertible_v<decltype(UE::Core::ArrayView::Private::GetDataHelper(std::declval<RangeType&>())), const ElementType*>) |
| bool | UEOpEquals (RangeType &&Rhs) const |
| |
Templated fixed-size view of another array
A statically sized view of an array of typed elements. Designed to allow functions to take either a fixed C array or a TArray with an arbitrary allocator as an argument when the function neither adds nor removes elements
e.g.: int32 SumAll(TArrayView<const int32> array) { return Algo::Accumulate(array); }
could be called as: SumAll(MyTArray);\ SumAll(MyCArray); SumAll(MakeArrayView(Ptr, Num));
auto Values = { 1, 2, 3 }; SumAll(Values);
Note: View classes are not const-propagating! If you want a view where the elements are const, you need "TArrayView<const T>" not "const TArrayView<T>"!
Caution: Treat a view like a reference to the elements in the array. DO NOT free or reallocate the array while the view exists! For this reason, be mindful of lifetimes when constructing TArrayViews from rvalue initializer lists:
TArrayView<int> View = { 1, 2, 3 }; // construction of array view from rvalue initializer list int n = View[0]; // undefined behavior, as the initializer list was destroyed at the end of the previous line