Class that represents an array data structure. Objects of this class should only be allocated using System::MakeArray() and System::MakeObject() functions. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...

Inherits System::Object, and System::Collections::Generic::IList< T >.

Classes

class  Enumerator
 Implements IEnumerator interface that enables enumeration of elements of an Array object. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 

Public Types

using ValueType = T
 Alias for the type of the elements of the array. More...
 
using UnderlyingType = typename System::Details::SelectType< T >::type
 Alias for the type used to represent each element of the array. More...
 
typedef SharedPtr< Collections::Generic::IEnumerable< T > > EnumerablePtr
 An alias for shared pointer type pointing to IEnumerable object containing elements of type T. More...
 
typedef SharedPtr< Collections::Generic::IEnumerator< T > > EnumeratorPtr
 An alias for shared pointer type pointing to IEnumerator object containing elements of type T. More...
 
typedef vector_t::iterator iterator
 Iterator type. More...
 
typedef vector_t::const_iterator const_iterator
 Const iterator type. More...
 
typedef vector_t::reverse_iterator reverse_iterator
 Reverse iterator type. More...
 
typedef vector_t::const_reverse_iterator const_reverse_iterator
 Const reverse iterator type. More...
 
- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
- Public Types inherited from System::Collections::Generic::IList< T >
typedef ICollection< T > BaseType
 Base type. More...
 
typedef IList< T > ThisType
 This type. More...
 
typedef T ValueType
 Value type. More...
 
- Public Types inherited from System::Collections::Generic::ICollection< T >
typedef T ValueType
 Value type name. More...
 
typedef ICollection< T > ThisType
 Collection type name. More...
 
- Public Types inherited from System::Collections::Generic::IEnumerable< T >
typedef IEnumerator< T > IEnumeratorType
 Enumerator type. More...
 
using ValueType = T
 
using iterator = System::Details::VirtualizedIterator< T >
 Iterator type. More...
 
using const_iterator = System::Details::VirtualizedConstIterator< T >
 Const iterator type. More...
 
using virtualized_iterator = System::Details::VirtualizedIteratorBase< T >
 Inner iterator base type. More...
 
using virtualized_iterator_element = T
 Inner iterator element type. More...
 

Public Member Functions

 Array ()
 Constructs an empty array. More...
 
 Array (int count, const T &init=T())
 Filling constructor. More...
 
template<typename ValueType >
 Array (typename std::enable_if< std::is_arithmetic< T >::value &&std::is_arithmetic< ValueType >::value &&std::is_convertible< ValueType, T >::value, int >::type count, ValueType init)
 Filling constructor. More...
 
 Array (int count, const T inits[])
 Filling constructor. More...
 
 Array (vector_t &&value)
 Move constructor. More...
 
 Array (const vector_t &assgn)
 Copy constructor. More...
 
template<typename Q , typename = typename std::enable_if<std::is_same<Q, T>::value && !std::is_same<std::vector<Q>, vector_t>::value, std::vector<Q>>::type>
 Array (const std::vector< Q > &value)
 Constructs an Array object and fills it with values copied from an std::vector object whose values' type is the same as T but different from UnderlyingType. More...
 
template<typename Q , typename = typename std::enable_if<std::is_same<Q, T>::value && !std::is_same<std::vector<Q>, vector_t>::value, std::vector<Q>>::type>
 Array (std::vector< Q > &&value)
 Constructs an Array object and fills it with values moved from an std::vector object whose values' type is the same as T but different from UnderlyingType. More...
 
 Array (std::initializer_list< UnderlyingType > init)
 Constructs an Array object and fills it with values from the specified initializer list containing elements of UnderlyingType type. More...
 
template<std::size_t InitArraySize>
 Array (const std::array< UnderlyingType, InitArraySize > &init)
 Constructs an Array object and fills it with values from the specified array containing elements of UnderlyingType type. More...
 
 Array (std::initializer_list< bool > init, int=0)
 Constructs an Array object and fills it with values from the specified initializer list containing elements of bool type. More...
 
virtual EnumeratorPtr GetEnumerator () override
 Returns a pointer to Enumerator object that provides IEnumerator interface to elements of the array represented by the current object. More...
 
virtual int get_Count () const override
 Returns the size of the array. More...
 
virtual void Add (const T &) override
 Not supported because the array represented by the current object is read-only. More...
 
virtual void Clear () override
 Not supported because the array represented by the current object is read-only. More...
 
void SetTemplateWeakPtr (uint32_t argument) override
 Makes array treat stored pointers as weak (if applicable). More...
 
virtual bool Contains (const T &item) const override
 Determines if the specified item is in the array. More...
 
virtual bool Remove (const T &) override
 Not supported because the array represented by the current object is read-only. More...
 
virtual bool get_IsReadOnly () const override
 Indicates whether the array is read-only. More...
 
virtual void CopyTo (ArrayPtr< T > arr, int arrayIndex) override
 Copies all elements of the current array to the specified destination array. Elements are inserted into destination array starting at index specified by arrayIndex argument. More...
 
virtual int IndexOf (const T &item) const override
 Determines the index of the first occurrence of the specified item in the array. More...
 
virtual void Insert (int, const T &) override
 Not supported because array represented by the current object is read-only. More...
 
virtual void RemoveAt (int) override
 Not supported because array represented by the current object is read-only. More...
 
virtual T idx_get (int index) const override
 Returns the item at the specified index. More...
 
virtual void idx_set (int index, T value) override
 Sets the specified value as the item of the array at the specified index. More...
 
ArrayPtr< T > Init (const T inits[])
 Fills the array represented by the current object with the values from the specified array. More...
 
void Initialize ()
 Fills the array with the default constructed objects of type T. More...
 
UnderlyingTypeoperator[] (int index)
 Returns an item at the specified index. More...
 
UnderlyingType const & operator[] (int index) const
 Returns an item at the specified index. More...
 
ArrayPtr< T > Clone ()
 Clones the array. More...
 
int GetLength (int dimension)
 Returns the number of elements in the specified dimension. More...
 
int64_t GetLongLength (int dimension)
 Returns the number of elements in the specified dimension as 64-bit integer. More...
 
int GetLowerBound (int dimension) const
 Returns the lower bound of the specified dimension. More...
 
int GetUpperBound (int dimension)
 Returns the upper bound of the specified dimension. More...
 
int32_t get_Rank () const
 NOT IMPLEMENTED. More...
 
int32_t get_Length () const
 Returns 32-bit integer that represents the total number of all elements in all dimensions of the array. More...
 
int64_t get_LongLength () const
 Returns 64-bit integer that represents the total number of all elements in all dimensions of the array. More...
 
size_t GetSizeTLength () const
 Returns an std::size_t variable that represents the total number of all elements in all dimensions of the array. More...
 
int Count () const
 Returns a number that represents the total number of all elements in all dimensions of the array. More...
 
template<typename DstType >
void CopyTo (const ArrayPtr< DstType > &dstArray, int64_t dstIndex) const
 Copies all elements of the current array to the specified destination array. Elements are inserted into the destination array starting at index specified by dstIndex argument. More...
 
template<typename DstType >
void CopyTo (const System::Details::ArrayView< DstType > &dstArray, int64_t dstIndex) const
 Copies all elements of the current array to the specified destination array view. Elements are inserted into the destination array view starting at index specified by dstIndex argument. More...
 
template<typename DstType >
void CopyTo (const ArrayPtr< DstType > &dstArray, int64_t srcIndex, int64_t dstIndex, int64_t count) const
 Copies a specified number of elements from the current array starting at specified position to specified destination array. Elements are inserted into the destination array starting at index specified by dstIndex argument. More...
 
template<typename DstType >
void CopyTo (const System::Details::ArrayView< DstType > &dstArray, int64_t srcIndex, int64_t dstIndex, int64_t count) const
 Copies a specified number of elements from the current array starting at specified position to specified destination array view. Elements are inserted into the destination array view starting at index specified by dstIndex argument. More...
 
void SetValue (const T &value, int index)
 Sets value of the element at specified index. More...
 
vector_tdata ()
 Returns a reference to the internal data structure used to store the array elements. More...
 
const vector_tdata () const
 Returns a constant reference to the internal data structure used to store the array elements. More...
 
vector_t::pointer data_ptr ()
 Returns a raw pointer to the beginning of the memory buffer where the array elements are stored. More...
 
const UnderlyingTypedata_ptr () const
 Returns a constant raw pointer to the beginning of the memory buffer where the array elements are stored. More...
 
iterator begin () noexcept
 Returns an iterator to the first element of the container. If the container is empty, the returned iterator will be equal to end(). More...
 
const_iterator begin () const noexcept
 Returns an iterator to the first element of the const-qualified container. If the container is empty, the returned iterator will be equal to end(). More...
 
const_iterator cbegin () const noexcept
 Returns an iterator to the first const-qualified element of the container. If the container is empty, the returned iterator will be equal to cend(). More...
 
iterator end () noexcept
 Returns an iterator to the element following the last element of the container. This element acts as a placeholder; attempting to access it results in undefined behavior. More...
 
const_iterator end () const noexcept
 Returns an iterator to the element following the last element of the const-qualified container. This element acts as a placeholder; attempting to access it results in undefined behavior. More...
 
const_iterator cend () const noexcept
 Returns an iterator to the element following the last element of the container. This element acts as a placeholder; attempting to access it results in undefined behavior. More...
 
reverse_iterator rbegin () noexcept
 Returns a reverse iterator to the first element of the reversed container. It corresponds to the last element of the non-reversed container. If the container is empty, the returned iterator is equal to rend(). More...
 
const_reverse_iterator rbegin () const noexcept
 Returns a reverse iterator to the first element of the reversed container. It corresponds to the last element of the non-reversed container. If the container is empty, the returned iterator is equal to rend(). More...
 
const_reverse_iterator crbegin () const noexcept
 Returns a reverse iterator to the first element of the reversed container. It corresponds to the last element of the non-reversed container. If the container is empty, the returned iterator is equal to crend(). More...
 
reverse_iterator rend () noexcept
 Returns a reverse iterator to the element following the last element of the reversed container. It corresponds to the element preceding the first element of the non-reversed container. This element acts as a placeholder, attempting to access it results in undefined behavior. More...
 
const_reverse_iterator rend () const noexcept
 Returns a reverse iterator to the element following the last element of the reversed container. It corresponds to the element preceding the first element of the non-reversed container. This element acts as a placeholder, attempting to access it results in undefined behavior. More...
 
const_reverse_iterator crend () const noexcept
 Returns a reverse iterator to the element following the last element of the reversed container. It corresponds to the element preceding the first element of the non-reversed container. This element acts as a placeholder, attempting to access it results in undefined behavior. More...
 
UnderlyingType Min () const
 Finds the smallest element in the array using operator<() to compare elements. More...
 
UnderlyingType Max () const
 Finds the largest element in the array using operator<() to compare elements. More...
 
System::Details::VirtualizedIteratorBase< T > * virtualizeBeginIterator () override
 Gets the implementation of begin iterator for the current container. More...
 
System::Details::VirtualizedIteratorBase< T > * virtualizeEndIterator () override
 Gets the implementation of end iterator for the current container. More...
 
System::Details::VirtualizedIteratorBase< T > * virtualizeBeginConstIterator () const override
 Gets the implementation of begin const iterator for the current container. More...
 
System::Details::VirtualizedIteratorBase< T > * virtualizeEndConstIterator () const override
 Gets the implementation of end const iterator for the current container. More...
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared reference counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () const
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool Equals (double const &objA, double const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 Specialization of Object::ReferenceEquals for case of string and nullptr. More...
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 Specialization of Object::ReferenceEquals for case of strings. More...
 
- Public Member Functions inherited from System::Collections::Generic::IList< T >
bool get_IsFixedSize ()
 Checks whether the collection is of fixed size. More...
 
- Public Member Functions inherited from System::Collections::Generic::ICollection< T >
ICollectionoperator= (ICollection &&) noexcept
 Move assignment operator. More...
 
ICollectionoperator= (const ICollection &)
 Move assignment operator. More...
 
 ICollection ()
 Default constructor. More...
 
 ICollection (const ICollection &)
 Copy constructor. More...
 
 ICollection (ICollection &&) noexcept
 Move constructor. More...
 
virtual ~ICollection ()
 Destructor. More...
 
SharedPtr< Objectget_SyncRoot () const
 Gets the object the collection is being synchronized through. More...
 
- Public Member Functions inherited from System::Collections::Generic::IEnumerable< T >
LINQ_ElementAt (int index)
 Returns the element at a specified index in a sequence. More...
 
LINQ_First ()
 Returns the first element of a sequence. More...
 
LINQ_First (const Func< T, bool > &predicate)
 Returns the first element of a sequence that satisfy the specified condition. More...
 
LINQ_FirstOrDefault ()
 Returns the first element of a sequence, or a default value if the sequence is empty. More...
 
LINQ_FirstOrDefault (std::function< bool(T)> predicate)
 Returns the first element of the sequence that satisfies a condition or a default value if no such element is found. More...
 
LINQ_Last ()
 Returns the last element of a sequence. More...
 
LINQ_LastOrDefault ()
 Returns the last element of a sequence, or a default value if the sequence is empty. More...
 
SharedPtr< List< T > > LINQ_ToList ()
 Creates a List<T> from a sequence. More...
 
int LINQ_Count ()
 Returns the number of elements in the sequence (calculated via direct counting). More...
 
int LINQ_Count (const Func< T, bool > &predicate)
 Returns the number of elements in the sequence that satisfy the specified condition. More...
 
System::ArrayPtr< T > LINQ_ToArray ()
 Creates an array from a sequence. More...
 
bool LINQ_All (std::function< bool(T)> predicate)
 Determines whether all elements of a sequence satisfy a condition. More...
 
bool LINQ_Any ()
 Determines whether a sequence contains any elements. More...
 
bool LINQ_Any (std::function< bool(T)> predicate)
 Determines whether any element of a sequence exists or satisfies a condition. More...
 
SharedPtr< IEnumerable< T > > LINQ_Where (std::function< bool(T)> predicate)
 Filters a sequence based on the specified predicate. More...
 
bool LINQ_Contains (T value)
 Determines if a sequence contains a specified value. More...
 
template<typename ResultType >
SharedPtr< IEnumerable< ResultType > > LINQ_Cast ()
 Casts the elements to the specified type. More...
 
template<typename Key >
SharedPtr< IEnumerable< T > > LINQ_OrderBy (const Func< T, Key > &keySelector)
 Sorts the elements of a sequence in ascending order according to the key values selected by keySelector. More...
 
template<typename Key >
SharedPtr< IEnumerable< T > > LINQ_OrderByDescending (const Func< T, Key > &keySelector)
 Sorts the elements of a sequence in descending order according to the key values selected by keySelector. More...
 
template<typename ResultType >
SharedPtr< IEnumerable< ResultType > > LINQ_OfType ()
 Filters the elements of the sequence based on the specified type. More...
 
template<typename ResultType >
SharedPtr< IEnumerable< ResultType > > LINQ_Select (const Func< T, ResultType > &selector)
 Transforms elements of a sequence. More...
 
template<typename ResultType >
SharedPtr< IEnumerable< ResultType > > LINQ_Select (const Func< T, int32_t, ResultType > &selector)
 Transforms each element of a sequence into a new form by incorporating the element's index. More...
 
SharedPtr< IEnumerable< T > > LINQ_Concat (SharedPtr< IEnumerable< T >> sequence)
 Concatenates two sequences. More...
 
template<typename Key >
System::SharedPtr< IEnumerable< System::SharedPtr< System::Linq::IGrouping< Key, T > > > > LINQ_GroupBy (System::Func< T, Key > keyPredicate)
 Groups the elements of a sequence. More...
 
template<typename ResultType >
SharedPtr< IEnumerable< ResultType > > LINQ_SelectMany (const Func< T, SharedPtr< IEnumerable< ResultType >>> &selector)
 Projects each element of a sequence and combines the resulting sequences into one sequence. More...
 
iterator begin ()
 Gets iterator pointing to the first element (if any) of the collection. This iterator can't be used to change a referenced object because GetEnumerator() returns a copy-object of T. More...
 
iterator end ()
 Gets iterator pointing right after the last element (if any) of the collection. This iterator can't be used to change a referenced object because GetEnumerator() returns a copy-object of T. More...
 
const_iterator begin () const
 Gets iterator pointing to the first element (if any) of the const-qualified instance of the collection. More...
 
const_iterator end () const
 Gets iterator pointing right after the last element (if any) of the const-qualified instance of the collection. More...
 
const_iterator cbegin () const
 Gets iterator pointing to the first const-qualified element (if any) of the collection. More...
 
const_iterator cend () const
 Gets iterator pointing right after the last const-qualified element (if any) of the collection. More...
 
template<typename Result >
SharedPtr< IEnumerable< Result > > LINQ_Cast ()
 
template<typename Result >
SharedPtr< IEnumerable< Result > > LINQ_OfType ()
 
template<typename Result >
SharedPtr< IEnumerable< Result > > LINQ_Select (const Func< Source, Result > &selector)
 
template<typename Result >
SharedPtr< IEnumerable< Result > > LINQ_Select (const Func< Source, int32_t, Result > &selector)
 
template<typename Key >
SharedPtr< IEnumerable< Source > > LINQ_OrderBy (const Func< Source, Key > &keySelector)
 
template<typename Key >
SharedPtr< IEnumerable< Source > > LINQ_OrderByDescending (const Func< Source, Key > &keySelector)
 
template<typename Key >
SharedPtr< IEnumerable< SharedPtr< System::Linq::IGrouping< Key, Source > > > > LINQ_GroupBy (System::Func< Source, Key > keyPredicate)
 
template<typename Result >
SharedPtr< IEnumerable< Result > > LINQ_SelectMany (const Func< Source, SharedPtr< IEnumerable< Result >>> &selector)
 

Static Public Member Functions

static int BinarySearch (System::ArrayPtr< T > arr, const T &item)
 Performs binary search in the sorted array. More...
 
template<typename Y , typename Z >
static int BinarySearch (System::ArrayPtr< T > arr, const Y &item, const SharedPtr< Collections::Generic::IComparer< Z >> &comparer)
 NOT IMPLEMENTED. More...
 
template<typename InputType , typename OutputType >
static ArrayPtr< OutputType > ConvertAll (ArrayPtr< InputType > input_array, Converter< InputType, OutputType > converter)
 Constructs a new Array object and fills it with elements of the specified array converted to OutputType type using the specified converter delegate. More...
 
template<typename InputType , typename OutputType >
static ArrayPtr< OutputType > ConvertAll (ArrayPtr< InputType > input_array, std::function< OutputType(InputType)> converter)
 Constructs a new Array object and fills it with elements of the specified array converted to OutputType type using the specified converter function object. More...
 
static int FindIndex (System::ArrayPtr< T > arr, System::Predicate< T > match)
 Searches for the first element in the specified array that satisfies the conditions of the specified predicate. More...
 
static T Find (System::ArrayPtr< T > arr, System::Predicate< T > match)
 Searches for the first element in the specified array that satisfies the conditions of the specified predicate. More...
 
static System::ArrayPtr< T > FindAll (System::ArrayPtr< T > arr, System::Predicate< T > match)
 Retrieves all the elements that match the conditions defined by the specified predicate. More...
 
static bool TrueForAll (System::ArrayPtr< T > arr, System::Predicate< T > match)
 Determines whether all elements in the specified array satisfy the conditions defined by specified predicate. More...
 
static void ForEach (const ArrayPtr< T > &arr, System::Action< T > action)
 Performs specified action on each element of the specified array. More...
 
template<typename ArrayType , typename ValueType >
static int IndexOf (const ArrayPtr< ArrayType > &arr, const ValueType &value)
 Determines the index of the first occurrence of specified item in the array. More...
 
template<typename ArrayType , typename ValueType >
static int IndexOf (const ArrayPtr< ArrayType > &arr, const ValueType &value, int startIndex)
 Determines the index of the first occurrence of the specified item in the array starting from the specified index. More...
 
template<typename ArrayType , typename ValueType >
static int IndexOf (const ArrayPtr< ArrayType > &arr, const ValueType &value, int startIndex, int count)
 Determines the index of the first occurrence of the specified item in a range of items of the array specified by the start index and the number of elements in the range. More...
 
template<typename ArrayType , typename ValueType >
static int LastIndexOf (const ArrayPtr< ArrayType > &arr, const ValueType &value, int startIndex, int count)
 Determines the index of the last occurrence of the specified item in a range of items of the array specified by the start index and the number of elements in the range. More...
 
template<typename ArrayType , typename ValueType >
static int LastIndexOf (const ArrayPtr< ArrayType > &items, const ValueType &value, int startIndex)
 Determines the index of the last occurrence of the specified item in the array starting from the specified index. More...
 
template<typename ArrayType , typename ValueType >
static int LastIndexOf (const ArrayPtr< ArrayType > &items, const ValueType &value)
 Determines the index of the last occurrence of the specified item in the array. More...
 
template<typename Type >
static void Clear (const ArrayPtr< Type > &arr, int startIndex, int count)
 Replaces count values starting at the startIndex index in the specified array with default values. More...
 
template<typename SrcType , typename DstType >
static void Copy (const ArrayPtr< SrcType > &srcArray, const ArrayPtr< DstType > &dstArray, int64_t count)
 Copies the specified number of elements from the source array to the destination array. More...
 
template<typename SrcType , typename DstType >
static void Copy (System::Details::ArrayView< SrcType > srcArray, const ArrayPtr< DstType > &dstArray, int64_t count)
 Copies the specified number of elements from the source array view to the destination array. More...
 
template<typename SrcType , typename DstType >
static void Copy (const ArrayPtr< SrcType > &srcArray, System::Details::ArrayView< DstType > dstArray, int64_t count)
 Copies the specified number of elements from the source array to the destination array view. More...
 
template<typename SrcType , typename DstType >
static void Copy (System::Details::ArrayView< SrcType > srcArray, System::Details::ArrayView< DstType > dstArray, int64_t count)
 Copies the specified number of elements from the source array view to the destination array view. More...
 
template<typename SrcType , std::size_t N, typename DstType >
static void Copy (System::Details::StackArray< SrcType, N > &srcArray, const ArrayPtr< DstType > &dstArray, int64_t count)
 Copies the specified number of elements from the source array on stack to the destination array. More...
 
template<typename SrcType , typename DstType , std::size_t N>
static void Copy (const ArrayPtr< SrcType > &srcArray, System::Details::StackArray< DstType, N > &dstArray, int64_t count)
 Copies the specified number of elements from the source array to the destination array on stack. More...
 
template<typename SrcType , std::size_t NS, typename DstType , std::size_t ND>
static void Copy (System::Details::StackArray< SrcType, NS > &srcArray, System::Details::StackArray< DstType, ND > &dstArray, int64_t count)
 Copies the specified number of elements from the source array on stack to the destination array on stack. More...
 
template<typename SrcType , typename DstType >
static void Copy (const ArrayPtr< SrcType > &srcArray, int64_t srcIndex, const ArrayPtr< DstType > &dstArray, int64_t dstIndex, int64_t count)
 Copies a specified number of elements from the source array starting at the specified index to the specified position in destination array. More...
 
template<typename SrcType , typename DstType >
static void Copy (System::Details::ArrayView< SrcType > srcArray, int64_t srcIndex, const ArrayPtr< DstType > &dstArray, int64_t dstIndex, int64_t count)
 Copies a specified number of elements from the source array view starting at the specified index to the specified position in destination array. More...
 
template<typename SrcType , typename DstType >
static void Copy (const ArrayPtr< SrcType > &srcArray, int64_t srcIndex, System::Details::ArrayView< DstType > dstArray, int64_t dstIndex, int64_t count)
 Copies a specified number of elements from the source array starting at the specified index to the specified position in destination array view. More...
 
template<typename SrcType , typename DstType >
static void Copy (System::Details::ArrayView< SrcType > srcArray, int64_t srcIndex, System::Details::ArrayView< DstType > dstArray, int64_t dstIndex, int64_t count)
 Copies a specified number of elements from the source array view starting at the specified index to the specified position in destination array view. More...
 
template<typename SrcType , std::size_t N, typename DstType >
static void Copy (System::Details::StackArray< SrcType, N > &srcArray, int64_t srcIndex, const ArrayPtr< DstType > &dstArray, int64_t dstIndex, int64_t count)
 Copies a specified number of elements from the source array on stack starting at the specified index to the specified position in destination array. More...
 
template<typename SrcType , typename DstType , std::size_t N>
static void Copy (const ArrayPtr< SrcType > &srcArray, int64_t srcIndex, System::Details::StackArray< DstType, N > &dstArray, int64_t dstIndex, int64_t count)
 Copies a specified number of elements from the source array starting at the specified index to the specified position in destination array on stack. More...
 
template<typename SrcType , std::size_t NS, typename DstType , std::size_t ND>
static void Copy (System::Details::StackArray< SrcType, NS > &srcArray, int64_t srcIndex, System::Details::StackArray< DstType, ND > &dstArray, int64_t dstIndex, int64_t count)
 Copies a specified number of elements from the source array on stack starting at the specified index to the specified position in destination array on stack. More...
 
template<typename SrcType , typename DstType , std::size_t ND>
static void Copy (System::Details::ArrayView< SrcType > &srcArray, int64_t srcIndex, System::Details::StackArray< DstType, ND > &dstArray, int64_t dstIndex, int64_t count)
 Copies a specified number of elements from the source array view starting at the specified index to the specified position in destination array on stack. More...
 
template<typename Type >
static void Sort (const ArrayPtr< Type > &arr)
 Sorts elements in the specified array using default comparer. More...
 
template<typename Type >
static void Sort (const ArrayPtr< Type > &arr, int startIndex, int count)
 Sorts a range of elements in the specified array using default comparer. More...
 
template<typename Type >
static void Sort (const ArrayPtr< Type > &arr, const SharedPtr< System::Collections::Generic::IComparer< T >> &comparator)
 Sorts elements in the specified array using specified comparer. More...
 
template<typename Type , typename Y >
static void Sort (const ArrayPtr< Type > &arr, const SharedPtr< System::Collections::Generic::IComparer< Y >> &comparator)
 NOT IMPLEMENTED. More...
 
template<typename TKey , typename TValue >
static void Sort (const ArrayPtr< TKey > &keys, const ArrayPtr< TValue > &items)
 Sorts two arrays one containing keys and the other - corresponding items, based on the values of array containing keys, elements of which are compared using operator<. More...
 
template<typename TKey , typename TValue >
static void Sort (const ArrayPtr< TKey > &keys, const ArrayPtr< TValue > &items, int index, int length)
 Sorts two arrays one containing keys and the other - corresponding items, based on the values of array containing keys, elements of which are compared using default comparer. More...
 
template<typename Type >
static void Reverse (const ArrayPtr< Type > &arr)
 Reverses elements in the specified array. More...
 
template<typename Type >
static void Reverse (const ArrayPtr< Type > &arr, int startIndex, int count)
 Reverses a range of elements in the specified array. More...
 
template<typename Type >
static void Resize (ArrayPtr< Type > &arr, int new_size)
 Changes the size of the specified array to the specified value or crates new array with specified size. More...
 
static bool Exists (ArrayPtr< T > arr, std::function< bool(T)> match)
 Determines if the specified Array object contains an element that satisfies requirements of the specified predicate. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Implements C# typeof(System.Object) construct. More...
 

Protected Types

typedef System::Details::CollectionHelpers::ContainerPointerMode< UnderlyingTypepointer_mode_t
 Type to keep information on whether to treat array elements as shared or weak pointers, if applicable. More...
 
typedef std::vector< UnderlyingType, typename pointer_mode_t::allocator_type > vector_t
 An alias for the type used to store the array's elements. More...
 

Protected Member Functions

 ~Array () override
 Destructor. More...
 
- Protected Member Functions inherited from System::Collections::Generic::IEnumerable< T >
 ~IEnumerable () override
 Destructor. More...
 
virtualized_iteratorGetEnumeratorAsVirtualizedIterator ()
 Gets enumerator instance and prepares it to be used as iterator kernel. More...
 
virtualized_iteratorGetEnumeratorAsVirtualizedIterator () const
 Gets enumerator instance and prepares it to be used as iterator kernel. More...
 

Protected Attributes

pointer_mode_t m_pointer_mode
 Information on whether to treat array elements as shared or weak pointers, if applicable. More...
 
vector_t m_data
 The storage for array's elements. More...
 

Detailed Description

template<typename T>
class System::Array< T >

Class that represents an array data structure. Objects of this class should only be allocated using System::MakeArray() and System::MakeObject() functions. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

#include <system/array.h>
#include <system/smart_ptr.h>
using namespace System;
void Print(const SmartPtr<Array<int32_t>> &arrayPtr)
{
for (auto item: arrayPtr)
{
std::cout << item << ' ';
}
std::cout << std::endl;
}
int main()
{
// Create and fill the array.
auto arrayPtr = MakeObject<Array<int32_t>>(5, 0);
for (auto i = 0; i < arrayPtr->get_Length(); ++i)
{
arrayPtr[i] = 5 - i;
}
// Print the array items.
Print(arrayPtr);
// Sort the array items by ascending.
// Print the array items.
Print(arrayPtr);
// Print the count of the array items.
std::cout << arrayPtr->get_Length() << std::endl;
// Print the index of the item that equals to 4.
std::cout << arrayPtr->IndexOf(4) << std::endl;
// Resize the array.
Array<int32_t>::Resize(arrayPtr, 3);
// Print the array items.
Print(arrayPtr);
return 0;
}
/*
This code example produces the following output:
5 4 3 2 1
1 2 3 4 5
5
3
1 2 3
*/
Template Parameters
TType of elements of an array

Member Typedef Documentation

◆ const_iterator

template<typename T>
typedef vector_t::const_iterator System::Array< T >::const_iterator

Const iterator type.

◆ const_reverse_iterator

template<typename T>
typedef vector_t::const_reverse_iterator System::Array< T >::const_reverse_iterator

Const reverse iterator type.

◆ EnumerablePtr

An alias for shared pointer type pointing to IEnumerable object containing elements of type T.

◆ EnumeratorPtr

An alias for shared pointer type pointing to IEnumerator object containing elements of type T.

◆ iterator

template<typename T>
typedef vector_t::iterator System::Array< T >::iterator

Iterator type.

◆ pointer_mode_t

template<typename T>
typedef System::Details::CollectionHelpers::ContainerPointerMode<UnderlyingType> System::Array< T >::pointer_mode_t
protected

Type to keep information on whether to treat array elements as shared or weak pointers, if applicable.

◆ reverse_iterator

template<typename T>
typedef vector_t::reverse_iterator System::Array< T >::reverse_iterator

Reverse iterator type.

◆ UnderlyingType

template<typename T>
using System::Array< T >::UnderlyingType = typename System::Details::SelectType<T>::type

Alias for the type used to represent each element of the array.

◆ ValueType

template<typename T>
using System::Array< T >::ValueType = T

Alias for the type of the elements of the array.

◆ vector_t

template<typename T>
typedef std::vector<UnderlyingType, typename pointer_mode_t::allocator_type> System::Array< T >::vector_t
protected

An alias for the type used to store the array's elements.

Constructor & Destructor Documentation

◆ Array() [1/11]

template<typename T>
System::Array< T >::Array ( )
inline

Constructs an empty array.

◆ Array() [2/11]

template<typename T>
System::Array< T >::Array ( int  count,
const T &  init = T() 
)
inline

Filling constructor.

Parameters
countInitial size of the array
initThe initial value used to fill the array with

◆ Array() [3/11]

template<typename T>
template<typename ValueType >
System::Array< T >::Array ( typename std::enable_if< std::is_arithmetic< T >::value &&std::is_arithmetic< ValueType >::value &&std::is_convertible< ValueType, T >::value, int >::type  count,
ValueType  init 
)
inline

Filling constructor.

Parameters
countInitial size of the array
initThe initial value used to fill the array with
Template Parameters
ValueTypeType of initial value

◆ Array() [4/11]

template<typename T>
System::Array< T >::Array ( int  count,
const T  inits[] 
)
inline

Filling constructor.

Parameters
countInitial size of the array
initsValues to fill the array with

◆ Array() [5/11]

template<typename T>
System::Array< T >::Array ( vector_t &&  value)
inline

Move constructor.

Parameters
valuestd::vector, elements of which are acquired by the array

◆ Array() [6/11]

template<typename T>
System::Array< T >::Array ( const vector_t assgn)
inline

Copy constructor.

Parameters
assgnstd::vector to copy values from

◆ Array() [7/11]

template<typename T>
template<typename Q , typename = typename std::enable_if<std::is_same<Q, T>::value && !std::is_same<std::vector<Q>, vector_t>::value, std::vector<Q>>::type>
System::Array< T >::Array ( const std::vector< Q > &  value)
inline

Constructs an Array object and fills it with values copied from an std::vector object whose values' type is the same as T but different from UnderlyingType.

Parameters
valuestd::vector to copy the values from
Template Parameters
QThe type of the elements of the std::vector object to copy the elements from

◆ Array() [8/11]

template<typename T>
template<typename Q , typename = typename std::enable_if<std::is_same<Q, T>::value && !std::is_same<std::vector<Q>, vector_t>::value, std::vector<Q>>::type>
System::Array< T >::Array ( std::vector< Q > &&  value)
inline

Constructs an Array object and fills it with values moved from an std::vector object whose values' type is the same as T but different from UnderlyingType.

Parameters
valuestd::vector to copy the values from
Template Parameters
QThe type of the elements of the std::vector object to move the elements from

◆ Array() [9/11]

template<typename T>
System::Array< T >::Array ( std::initializer_list< UnderlyingType init)
inline

Constructs an Array object and fills it with values from the specified initializer list containing elements of UnderlyingType type.

Parameters
initInitializer list containing elements to fill the array with

◆ Array() [10/11]

template<typename T>
template<std::size_t InitArraySize>
System::Array< T >::Array ( const std::array< UnderlyingType, InitArraySize > &  init)
inline

Constructs an Array object and fills it with values from the specified array containing elements of UnderlyingType type.

Parameters
initArray to copy into the array being constructed.
Template Parameters
InitArraySizeNumber of elements of the init array.

◆ Array() [11/11]

template<typename T>
System::Array< T >::Array ( std::initializer_list< bool >  init,
int  = 0 
)
inline

Constructs an Array object and fills it with values from the specified initializer list containing elements of bool type.

Parameters
initInitializer list containing elements to fill the array with

◆ ~Array()

template<typename T>
System::Array< T >::~Array ( )
inlineoverrideprotected

Destructor.

Member Function Documentation

◆ Add()

template<typename T>
virtual void System::Array< T >::Add ( const T &  )
inlineoverridevirtual

Not supported because the array represented by the current object is read-only.

Exceptions
NotSupportedExceptionalways

Implements System::Collections::Generic::ICollection< T >.

◆ begin() [1/2]

template<typename T>
iterator System::Array< T >::begin ( )
inlinenoexcept

Returns an iterator to the first element of the container. If the container is empty, the returned iterator will be equal to end().

Returns
An iterator pointing to the first element of the container.

◆ begin() [2/2]

template<typename T>
const_iterator System::Array< T >::begin ( ) const
inlinenoexcept

Returns an iterator to the first element of the const-qualified container. If the container is empty, the returned iterator will be equal to end().

Returns
An iterator pointing to the first element of the const-qualified container.

◆ BinarySearch() [1/2]

template<typename T>
static int System::Array< T >::BinarySearch ( System::ArrayPtr< T >  arr,
const T &  item 
)
inlinestatic

Performs binary search in the sorted array.

Parameters
arrSorted array to perform search in
itemAn item to search for
Returns
Index of the searched item if one is found, otherwise, a negative integer that is the bitwise complement of the index of the next item greater than searched item or, if there is no greater item, the bitwise complement of the number of elements in the array.

◆ BinarySearch() [2/2]

template<typename T>
template<typename Y , typename Z >
static int System::Array< T >::BinarySearch ( System::ArrayPtr< T >  arr,
const Y &  item,
const SharedPtr< Collections::Generic::IComparer< Z >> &  comparer 
)
inlinestatic

NOT IMPLEMENTED.

Exceptions
NotImplementedExceptionAlways

◆ cbegin()

template<typename T>
const_iterator System::Array< T >::cbegin ( ) const
inlinenoexcept

Returns an iterator to the first const-qualified element of the container. If the container is empty, the returned iterator will be equal to cend().

Returns
An iterator pointing to the first const-qualified element of the container.

◆ cend()

template<typename T>
const_iterator System::Array< T >::cend ( ) const
inlinenoexcept

Returns an iterator to the element following the last element of the container. This element acts as a placeholder; attempting to access it results in undefined behavior.

Returns
An iterator pointing to the theoretical const-qualified element placed after the last element of the container.

◆ Clear() [1/2]

template<typename T>
virtual void System::Array< T >::Clear ( )
inlineoverridevirtual

Not supported because the array represented by the current object is read-only.

Exceptions
NotSupportedExceptionalways

Implements System::Collections::Generic::ICollection< T >.

◆ Clear() [2/2]

template<typename T>
template<typename Type >
static void System::Array< T >::Clear ( const ArrayPtr< Type > &  arr,
int  startIndex,
int  count 
)
inlinestatic

Replaces count values starting at the startIndex index in the specified array with default values.

Parameters
arrTarget array
startIndexIndex at which to start replacing the items
countThe number of items to replace
Template Parameters
TypeType of elements in the target array

◆ Clone()

template<typename T>
ArrayPtr<T> System::Array< T >::Clone ( )
inline

Clones the array.

Returns
A pointer to a new array object containing items that are copies of items of the array represented by the current object.

◆ Contains()

template<typename T>
virtual bool System::Array< T >::Contains ( const T &  item) const
inlineoverridevirtual

Determines if the specified item is in the array.

Parameters
itemItem to look for in the array
Returns
true if the specified item is present in the array, false otherwise

Implements System::Collections::Generic::ICollection< T >.

◆ ConvertAll() [1/2]

template<typename T>
template<typename InputType , typename OutputType >
static ArrayPtr<OutputType> System::Array< T >::ConvertAll ( ArrayPtr< InputType >  input_array,
Converter< InputType, OutputType >  converter 
)
inlinestatic

Constructs a new Array object and fills it with elements of the specified array converted to OutputType type using the specified converter delegate.

Parameters
input_arrayAn Array object
converterA Converter object used to convert each element of the input array to equivalent values of OutputType type
Returns
A new array containing values of OutputType type equivalent to the values of input_array
Template Parameters
InputTypeThe type of elements of input array
OutputTypeThe type of elements of the resulting array

◆ ConvertAll() [2/2]

template<typename T>
template<typename InputType , typename OutputType >
static ArrayPtr<OutputType> System::Array< T >::ConvertAll ( ArrayPtr< InputType >  input_array,
std::function< OutputType(InputType)>  converter 
)
inlinestatic

Constructs a new Array object and fills it with elements of the specified array converted to OutputType type using the specified converter function object.

Parameters
input_arrayAn Array object
converterA function object used to convert each element of the input array to equivalent values of OutputType type
Returns
A new array containing values of OutputType type equivalent to the values of input_array
Template Parameters
InputTypeThe type of elements of input array
OutputTypeThe type of elements of the resulting array

◆ Copy() [1/15]

template<typename T>
template<typename SrcType , typename DstType >
static void System::Array< T >::Copy ( const ArrayPtr< SrcType > &  srcArray,
const ArrayPtr< DstType > &  dstArray,
int64_t  count 
)
inlinestatic

Copies the specified number of elements from the source array to the destination array.

Parameters
srcArraySource array
dstArrayDestination array
countThe number of elements to copy

◆ Copy() [2/15]

template<typename T>
template<typename SrcType , typename DstType >
static void System::Array< T >::Copy ( System::Details::ArrayView< SrcType >  srcArray,
const ArrayPtr< DstType > &  dstArray,
int64_t  count 
)
inlinestatic

Copies the specified number of elements from the source array view to the destination array.

Parameters
srcArraySource array view
dstArrayDestination array
countThe number of elements to copy

◆ Copy() [3/15]

template<typename T>
template<typename SrcType , typename DstType >
static void System::Array< T >::Copy ( const ArrayPtr< SrcType > &  srcArray,
System::Details::ArrayView< DstType >  dstArray,
int64_t  count 
)
inlinestatic

Copies the specified number of elements from the source array to the destination array view.

Parameters
srcArraySource array
dstArrayDestination array view
countThe number of elements to copy

◆ Copy() [4/15]

template<typename T>
template<typename SrcType , typename DstType >
static void System::Array< T >::Copy ( System::Details::ArrayView< SrcType >  srcArray,
System::Details::ArrayView< DstType >  dstArray,
int64_t  count 
)
inlinestatic

Copies the specified number of elements from the source array view to the destination array view.

Parameters
srcArraySource array view
dstArrayDestination array view
countThe number of elements to copy

◆ Copy() [5/15]

template<typename T>
template<typename SrcType , std::size_t N, typename DstType >
static void System::Array< T >::Copy ( System::Details::StackArray< SrcType, N > &  srcArray,
const ArrayPtr< DstType > &  dstArray,
int64_t  count 
)
inlinestatic

Copies the specified number of elements from the source array on stack to the destination array.

Parameters
srcArraySource array on stack
dstArrayDestination array
countThe number of elements to copy

◆ Copy() [6/15]

template<typename T>
template<typename SrcType , typename DstType , std::size_t N>
static void System::Array< T >::Copy ( const ArrayPtr< SrcType > &  srcArray,
System::Details::StackArray< DstType, N > &  dstArray,
int64_t  count 
)
inlinestatic

Copies the specified number of elements from the source array to the destination array on stack.

Parameters
srcArraySource array
dstArrayDestination array on stack
countThe number of elements to copy

◆ Copy() [7/15]

template<typename T>
template<typename SrcType , std::size_t NS, typename DstType , std::size_t ND>
static void System::Array< T >::Copy ( System::Details::StackArray< SrcType, NS > &  srcArray,
System::Details::StackArray< DstType, ND > &  dstArray,
int64_t  count 
)
inlinestatic

Copies the specified number of elements from the source array on stack to the destination array on stack.

Parameters
srcArraySource array on stack
dstArrayDestination array on stack
countThe number of elements to copy

◆ Copy() [8/15]

template<typename T>
template<typename SrcType , typename DstType >
static void System::Array< T >::Copy ( const ArrayPtr< SrcType > &  srcArray,
int64_t  srcIndex,
const ArrayPtr< DstType > &  dstArray,
int64_t  dstIndex,
int64_t  count 
)
inlinestatic

Copies a specified number of elements from the source array starting at the specified index to the specified position in destination array.

Parameters
srcArraySource array
srcIndexIndex in the source array designating the beginning of the range of items to copy
dstArrayDestination array
dstIndexIndex in destination array to start inserting copied items at
countThe number of elements to copy
Template Parameters
SrcTypeType of elements in source array
DstTypeType of elements in destination array

◆ Copy() [9/15]

template<typename T>
template<typename SrcType , typename DstType >
static void System::Array< T >::Copy ( System::Details::ArrayView< SrcType >  srcArray,
int64_t  srcIndex,
const ArrayPtr< DstType > &  dstArray,
int64_t  dstIndex,
int64_t  count 
)
inlinestatic

Copies a specified number of elements from the source array view starting at the specified index to the specified position in destination array.

Parameters
srcArraySource array view
srcIndexIndex in the source array view designating the beginning of the range of items to copy
dstArrayDestination array
dstIndexIndex in destination array to start inserting copied items at
countThe number of elements to copy
Template Parameters
SrcTypeType of elements in source array view
DstTypeType of elements in destination array

◆ Copy() [10/15]

template<typename T>
template<typename SrcType , typename DstType >
static void System::Array< T >::Copy ( const ArrayPtr< SrcType > &  srcArray,
int64_t  srcIndex,
System::Details::ArrayView< DstType >  dstArray,
int64_t  dstIndex,
int64_t  count 
)
inlinestatic

Copies a specified number of elements from the source array starting at the specified index to the specified position in destination array view.

Parameters
srcArraySource array
srcIndexIndex in the source array designating the beginning of the range of items to copy
dstArrayDestination array view
dstIndexIndex in destination array view to start inserting copied items at
countThe number of elements to copy
Template Parameters
SrcTypeType of elements in source array
DstTypeType of elements in destination array view

◆ Copy() [11/15]

template<typename T>
template<typename SrcType , typename DstType >
static void System::Array< T >::Copy ( System::Details::ArrayView< SrcType >  srcArray,
int64_t  srcIndex,
System::Details::ArrayView< DstType >  dstArray,
int64_t  dstIndex,
int64_t  count 
)
inlinestatic

Copies a specified number of elements from the source array view starting at the specified index to the specified position in destination array view.

Parameters
srcArraySource array view
srcIndexIndex in the source array view designating the beginning of the range of items to copy
dstArrayDestination array view
dstIndexIndex in destination array view to start inserting copied items at
countThe number of elements to copy
Template Parameters
SrcTypeType of elements in source array view
DstTypeType of elements in destination array view

◆ Copy() [12/15]

template<typename T>
template<typename SrcType , std::size_t N, typename DstType >
static void System::Array< T >::Copy ( System::Details::StackArray< SrcType, N > &  srcArray,
int64_t  srcIndex,
const ArrayPtr< DstType > &  dstArray,
int64_t  dstIndex,
int64_t  count 
)
inlinestatic

Copies a specified number of elements from the source array on stack starting at the specified index to the specified position in destination array.

Parameters
srcArraySource array on stack
srcIndexIndex in the source array on stack designating the beginning of the range of items to copy
dstArrayDestination array
dstIndexIndex in destination array to start inserting copied items at
countThe number of elements to copy
Template Parameters
SrcTypeType of elements in source array on stack
DstTypeType of elements in destination array

◆ Copy() [13/15]

template<typename T>
template<typename SrcType , typename DstType , std::size_t N>
static void System::Array< T >::Copy ( const ArrayPtr< SrcType > &  srcArray,
int64_t  srcIndex,
System::Details::StackArray< DstType, N > &  dstArray,
int64_t  dstIndex,
int64_t  count 
)
inlinestatic

Copies a specified number of elements from the source array starting at the specified index to the specified position in destination array on stack.

Parameters
srcArraySource array
srcIndexIndex in the source array designating the beginning of the range of items to copy
dstArrayDestination array on stack
dstIndexIndex in destination array on stack to start inserting copied items at
countThe number of elements to copy
Template Parameters
SrcTypeType of elements in source array
DstTypeType of elements in destination array on stack

◆ Copy() [14/15]

template<typename T>
template<typename SrcType , std::size_t NS, typename DstType , std::size_t ND>
static void System::Array< T >::Copy ( System::Details::StackArray< SrcType, NS > &  srcArray,
int64_t  srcIndex,
System::Details::StackArray< DstType, ND > &  dstArray,
int64_t  dstIndex,
int64_t  count 
)
inlinestatic

Copies a specified number of elements from the source array on stack starting at the specified index to the specified position in destination array on stack.

Parameters
srcArraySource array on stack
srcIndexIndex in the source array on stack designating the beginning of the range of items to copy
dstArrayDestination array on stack
dstIndexIndex in destination array on stack to start inserting copied items at
countThe number of elements to copy
Template Parameters
SrcTypeType of elements in source array on stack
DstTypeType of elements in destination array on stack

◆ Copy() [15/15]

template<typename T>
template<typename SrcType , typename DstType , std::size_t ND>
static void System::Array< T >::Copy ( System::Details::ArrayView< SrcType > &  srcArray,
int64_t  srcIndex,
System::Details::StackArray< DstType, ND > &  dstArray,
int64_t  dstIndex,
int64_t  count 
)
inlinestatic

Copies a specified number of elements from the source array view starting at the specified index to the specified position in destination array on stack.

Parameters
srcArraySource array view
srcIndexIndex in the source array view designating the beginning of the range of items to copy
dstArrayDestination array on stack
dstIndexIndex in destination array on stack to start inserting copied items at
countThe number of elements to copy
Template Parameters
SrcTypeType of elements in source array on stack
DstTypeType of elements in destination array on stack

◆ CopyTo() [1/5]

template<typename T>
virtual void System::Array< T >::CopyTo ( ArrayPtr< T >  arr,
int  arrayIndex 
)
inlineoverridevirtual

Copies all elements of the current array to the specified destination array. Elements are inserted into destination array starting at index specified by arrayIndex argument.

Parameters
arrDestination array
arrayIndexIndex in destination array to start inserting copied items at

Implements System::Collections::Generic::ICollection< T >.

◆ CopyTo() [2/5]

template<typename T>
template<typename DstType >
void System::Array< T >::CopyTo ( const ArrayPtr< DstType > &  dstArray,
int64_t  dstIndex 
) const
inline

Copies all elements of the current array to the specified destination array. Elements are inserted into the destination array starting at index specified by dstIndex argument.

Parameters
dstArrayDestination array
dstIndexIndex in destination array to start inserting copied items at
Template Parameters
DstTypeType of elements in destination array

◆ CopyTo() [3/5]

template<typename T>
template<typename DstType >
void System::Array< T >::CopyTo ( const System::Details::ArrayView< DstType > &  dstArray,
int64_t  dstIndex 
) const
inline

Copies all elements of the current array to the specified destination array view. Elements are inserted into the destination array view starting at index specified by dstIndex argument.

Parameters
dstArrayDestination array view
dstIndexIndex in destination array view to start inserting copied items at
Template Parameters
DstTypeType of elements in destination array view

◆ CopyTo() [4/5]

template<typename T>
template<typename DstType >
void System::Array< T >::CopyTo ( const ArrayPtr< DstType > &  dstArray,
int64_t  srcIndex,
int64_t  dstIndex,
int64_t  count 
) const
inline

Copies a specified number of elements from the current array starting at specified position to specified destination array. Elements are inserted into the destination array starting at index specified by dstIndex argument.

Parameters
dstArrayDestination array
srcIndexIndex in source array to start copying items at
dstIndexIndex in destination array to start inserting copied items at
countNumber of elements to copy
Template Parameters
DstTypeType of elements in destination array

◆ CopyTo() [5/5]

template<typename T>
template<typename DstType >
void System::Array< T >::CopyTo ( const System::Details::ArrayView< DstType > &  dstArray,
int64_t  srcIndex,
int64_t  dstIndex,
int64_t  count 
) const
inline

Copies a specified number of elements from the current array starting at specified position to specified destination array view. Elements are inserted into the destination array view starting at index specified by dstIndex argument.

Parameters
dstArrayDestination array view
srcIndexIndex in source array to start copying items at
dstIndexIndex in destination array view to start inserting copied items at
countNumber of elements to copy
Template Parameters
DstTypeType of elements in destination array view

◆ Count()

template<typename T>
int System::Array< T >::Count ( ) const
inline

Returns a number that represents the total number of all elements in all dimensions of the array.

Returns
Total number of all elements in all dimensions

◆ crbegin()

template<typename T>
const_reverse_iterator System::Array< T >::crbegin ( ) const
inlinenoexcept

Returns a reverse iterator to the first element of the reversed container. It corresponds to the last element of the non-reversed container. If the container is empty, the returned iterator is equal to crend().

Returns
An iterator pointing to the last const-qualified element of the container.

◆ crend()

template<typename T>
const_reverse_iterator System::Array< T >::crend ( ) const
inlinenoexcept

Returns a reverse iterator to the element following the last element of the reversed container. It corresponds to the element preceding the first element of the non-reversed container. This element acts as a placeholder, attempting to access it results in undefined behavior.

Returns
An iterator pointing to the theoretical const-qualified element preceding the first element of the container.

◆ data() [1/2]

template<typename T>
vector_t& System::Array< T >::data ( )
inline

Returns a reference to the internal data structure used to store the array elements.

◆ data() [2/2]

template<typename T>
const vector_t& System::Array< T >::data ( ) const
inline

Returns a constant reference to the internal data structure used to store the array elements.

◆ data_ptr() [1/2]

template<typename T>
vector_t::pointer System::Array< T >::data_ptr ( )
inline

Returns a raw pointer to the beginning of the memory buffer where the array elements are stored.

◆ data_ptr() [2/2]

template<typename T>
const UnderlyingType* System::Array< T >::data_ptr ( ) const
inline

Returns a constant raw pointer to the beginning of the memory buffer where the array elements are stored.

◆ end() [1/2]

template<typename T>
iterator System::Array< T >::end ( )
inlinenoexcept

Returns an iterator to the element following the last element of the container. This element acts as a placeholder; attempting to access it results in undefined behavior.

Returns
An iterator pointing to the theoretical element placed after the last element of the container.

◆ end() [2/2]

template<typename T>
const_iterator System::Array< T >::end ( ) const
inlinenoexcept

Returns an iterator to the element following the last element of the const-qualified container. This element acts as a placeholder; attempting to access it results in undefined behavior.

Returns
An iterator pointing to the theoretical element placed after the last element of the const-qualified container.

◆ Exists()

template<typename T>
static bool System::Array< T >::Exists ( ArrayPtr< T >  arr,
std::function< bool(T)>  match 
)
inlinestatic

Determines if the specified Array object contains an element that satisfies requirements of the specified predicate.

Parameters
arrThe array to look for the element in
matchFunction object that defines requirements and checks if an element satisfies them
Returns
True if arr contains an element that satisfies requirements defined by match

◆ Find()

template<typename T>
static T System::Array< T >::Find ( System::ArrayPtr< T >  arr,
System::Predicate< T >  match 
)
inlinestatic

Searches for the first element in the specified array that satisfies the conditions of the specified predicate.

Parameters
arrArray to search an element in
matchA predicate that defines the conditions to match array elements against
Returns
Copy of the first element in the array that satisfies the conditions defined by predicate, otherwise default value of type T

◆ FindAll()

template<typename T>
static System::ArrayPtr<T> System::Array< T >::FindAll ( System::ArrayPtr< T >  arr,
System::Predicate< T >  match 
)
inlinestatic

Retrieves all the elements that match the conditions defined by the specified predicate.

Parameters
arrArray to search an elements in
matchA predicate that defines the conditions to match array elements against
Returns
An Array containing all the elements that match the conditions defined by the specified predicate, if found; otherwise, an empty Array.

◆ FindIndex()

template<typename T>
static int System::Array< T >::FindIndex ( System::ArrayPtr< T >  arr,
System::Predicate< T >  match 
)
inlinestatic

Searches for the first element in the specified array that satisfies the conditions of the specified predicate.

Parameters
arrArray to search an element in
matchA predicate that defines the conditions to match array elements against
Returns
The index of the first element in the array that satisfies the conditions defined by predicate, otherwise -1

◆ ForEach()

template<typename T>
static void System::Array< T >::ForEach ( const ArrayPtr< T > &  arr,
System::Action< T >  action 
)
inlinestatic

Performs specified action on each element of the specified array.

Parameters
arrTarget array
actionThe action to perform on each element of the array

◆ get_Count()

template<typename T>
virtual int System::Array< T >::get_Count ( ) const
inlineoverridevirtual

Returns the size of the array.

Implements System::Collections::Generic::ICollection< T >.

◆ get_IsReadOnly()

template<typename T>
virtual bool System::Array< T >::get_IsReadOnly ( ) const
inlineoverridevirtual

Indicates whether the array is read-only.

Returns
true if the array is read-only, false otherwise.

Reimplemented from System::Collections::Generic::ICollection< T >.

◆ get_Length()

template<typename T>
int32_t System::Array< T >::get_Length ( ) const
inline

Returns 32-bit integer that represents the total number of all elements in all dimensions of the array.

Returns
Total number of all elements in all dimensions

◆ get_LongLength()

template<typename T>
int64_t System::Array< T >::get_LongLength ( ) const
inline

Returns 64-bit integer that represents the total number of all elements in all dimensions of the array.

Returns
Total number of all elements in all dimensions

◆ get_Rank()

template<typename T>
int32_t System::Array< T >::get_Rank ( ) const
inline

NOT IMPLEMENTED.

◆ GetEnumerator()

template<typename T>
virtual EnumeratorPtr System::Array< T >::GetEnumerator ( )
inlineoverridevirtual

Returns a pointer to Enumerator object that provides IEnumerator interface to elements of the array represented by the current object.

Returns
Pointer to Enumerator object

Implements System::Collections::Generic::IEnumerable< T >.

◆ GetLength()

template<typename T>
int System::Array< T >::GetLength ( int  dimension)
inline

Returns the number of elements in the specified dimension.

Parameters
dimensionA dimension the length of which to return
Returns
Number of elements in the specified dimension

◆ GetLongLength()

template<typename T>
int64_t System::Array< T >::GetLongLength ( int  dimension)
inline

Returns the number of elements in the specified dimension as 64-bit integer.

Parameters
dimensionA dimension the length of which to return
Returns
A 64-bit integer representing the number of elements in specified dimension

◆ GetLowerBound()

template<typename T>
int System::Array< T >::GetLowerBound ( int  dimension) const
inline

Returns the lower bound of the specified dimension.

Parameters
dimensionDimension to return the lower bound of
Returns
The lower bound of the specified dimension

◆ GetSizeTLength()

template<typename T>
size_t System::Array< T >::GetSizeTLength ( ) const
inline

Returns an std::size_t variable that represents the total number of all elements in all dimensions of the array.

Returns
Total number of all elements in all dimensions

◆ GetUpperBound()

template<typename T>
int System::Array< T >::GetUpperBound ( int  dimension)
inline

Returns the upper bound of the specified dimension.

Parameters
dimensionDimension to return the upper bound of
Returns
The upper bound of the specified dimension

◆ idx_get()

template<typename T>
virtual T System::Array< T >::idx_get ( int  index) const
inlineoverridevirtual

Returns the item at the specified index.

Parameters
indexIndex of the item to be returned
Returns
The item at specified index in the array

Implements System::Collections::Generic::IList< T >.

◆ idx_set()

template<typename T>
virtual void System::Array< T >::idx_set ( int  index,
value 
)
inlineoverridevirtual

Sets the specified value as the item of the array at the specified index.

Parameters
indexIndex to set value at
valueValue to set at specified index

Implements System::Collections::Generic::IList< T >.

◆ IndexOf() [1/4]

template<typename T>
virtual int System::Array< T >::IndexOf ( const T &  item) const
inlineoverridevirtual

Determines the index of the first occurrence of the specified item in the array.

Parameters
itemItem index of which is to be determined
Returns
Index of the first occurrence of the specified item if the item is found, otherwise -1

Implements System::Collections::Generic::IList< T >.

◆ IndexOf() [2/4]

template<typename T>
template<typename ArrayType , typename ValueType >
static int System::Array< T >::IndexOf ( const ArrayPtr< ArrayType > &  arr,
const ValueType value 
)
inlinestatic

Determines the index of the first occurrence of specified item in the array.

Parameters
arrArray to search the specified item in
valueItem index of which is to be determined
Returns
Index of the first occurrence specified item if the item is found, otherwise -1
Template Parameters
ArrayTypeType of elements in the target array
ValueTypetype of the item to search for in the array

◆ IndexOf() [3/4]

template<typename T>
template<typename ArrayType , typename ValueType >
static int System::Array< T >::IndexOf ( const ArrayPtr< ArrayType > &  arr,
const ValueType value,
int  startIndex 
)
inlinestatic

Determines the index of the first occurrence of the specified item in the array starting from the specified index.

Parameters
arrArray to search the specified item in
valueItem index of which is to be determined
startIndexIndex at which the search is started
Returns
Index of the first occurrence of the specified item if the item is found, otherwise -1
Template Parameters
ArrayTypeType of elements in the target array
ValueTypetype of the item to search for in the array

◆ IndexOf() [4/4]

template<typename T>
template<typename ArrayType , typename ValueType >
static int System::Array< T >::IndexOf ( const ArrayPtr< ArrayType > &  arr,
const ValueType value,
int  startIndex,
int  count 
)
inlinestatic

Determines the index of the first occurrence of the specified item in a range of items of the array specified by the start index and the number of elements in the range.

Parameters
arrArray to search the specified item in
valueItem index of which is to be determined
startIndexIndex at which the search is started
countNumber of elements of the range to search in
Returns
Index of the first occurrence of the specified item if the item is found, otherwise -1
Template Parameters
ArrayTypeType of elements in the target array
ValueTypetype of the item to search for in the array

◆ Init()

template<typename T>
ArrayPtr<T> System::Array< T >::Init ( const T  inits[])
inline

Fills the array represented by the current object with the values from the specified array.

Parameters
initsThe array to copy the values from
Returns
A shared pointer pointing to the current object

◆ Initialize()

template<typename T>
void System::Array< T >::Initialize ( )
inline

Fills the array with the default constructed objects of type T.

◆ Insert()

template<typename T>
virtual void System::Array< T >::Insert ( int  ,
const T &   
)
inlineoverridevirtual

Not supported because array represented by the current object is read-only.

Exceptions
NotSupportedExceptionalways

Implements System::Collections::Generic::IList< T >.

◆ LastIndexOf() [1/3]

template<typename T>
template<typename ArrayType , typename ValueType >
static int System::Array< T >::LastIndexOf ( const ArrayPtr< ArrayType > &  arr,
const ValueType value,
int  startIndex,
int  count 
)
inlinestatic

Determines the index of the last occurrence of the specified item in a range of items of the array specified by the start index and the number of elements in the range.

Parameters
arrArray to search the specified item in
valueItem index of which is to be determined
startIndexIndex at which the search is started
countNumber of elements of the range to search in
Returns
Index of the last occurrence of the specified item if the item is found, otherwise -1
Template Parameters
ArrayTypeType of elements in the target array
ValueTypetype of the item to search for in the array

◆ LastIndexOf() [2/3]

template<typename T>
template<typename ArrayType , typename ValueType >
static int System::Array< T >::LastIndexOf ( const ArrayPtr< ArrayType > &  items,
const ValueType value,
int  startIndex 
)
inlinestatic

Determines the index of the last occurrence of the specified item in the array starting from the specified index.

Parameters
itemsArray to search the specified item in
valueItem index of which is to be determined
startIndexIndex at which the search is started
Returns
Index of the last occurrence of the specified item if the item is found, otherwise -1
Template Parameters
ArrayTypeType of elements in the target array
ValueTypetype of the item to search for in the array

◆ LastIndexOf() [3/3]

template<typename T>
template<typename ArrayType , typename ValueType >
static int System::Array< T >::LastIndexOf ( const ArrayPtr< ArrayType > &  items,
const ValueType value 
)
inlinestatic

Determines the index of the last occurrence of the specified item in the array.

Parameters
itemsArray to search the specified item in
valueItem index of which is to be determined
Returns
Index of the last occurrence of the specified item if the item is found, otherwise -1
Template Parameters
ArrayTypeType of elements in the target array
ValueTypetype of the item to search for in the array

◆ Max()

template<typename T>
UnderlyingType System::Array< T >::Max ( ) const
inline

Finds the largest element in the array using operator<() to compare elements.

Returns
A copy of the largest element in the array.

◆ Min()

template<typename T>
UnderlyingType System::Array< T >::Min ( ) const
inline

Finds the smallest element in the array using operator<() to compare elements.

Returns
A copy of the smallest element in the array.

◆ operator[]() [1/2]

template<typename T>
UnderlyingType& System::Array< T >::operator[] ( int  index)
inline

Returns an item at the specified index.

Parameters
indexIndex of the item to return
Returns
A reference to an item at specified position

◆ operator[]() [2/2]

template<typename T>
UnderlyingType const& System::Array< T >::operator[] ( int  index) const
inline

Returns an item at the specified index.

Parameters
indexIndex of the item to return
Returns
A const reference to an item at the specified position

◆ rbegin() [1/2]

template<typename T>
reverse_iterator System::Array< T >::rbegin ( )
inlinenoexcept

Returns a reverse iterator to the first element of the reversed container. It corresponds to the last element of the non-reversed container. If the container is empty, the returned iterator is equal to rend().

Returns
An iterator pointing to the last element of the container.

◆ rbegin() [2/2]

template<typename T>
const_reverse_iterator System::Array< T >::rbegin ( ) const
inlinenoexcept

Returns a reverse iterator to the first element of the reversed container. It corresponds to the last element of the non-reversed container. If the container is empty, the returned iterator is equal to rend().

Returns
An iterator pointing to the last element of the const-qualified container.

◆ Remove()

template<typename T>
virtual bool System::Array< T >::Remove ( const T &  )
inlineoverridevirtual

Not supported because the array represented by the current object is read-only.

Exceptions
NotSupportedExceptionalways

Implements System::Collections::Generic::ICollection< T >.

◆ RemoveAt()

template<typename T>
virtual void System::Array< T >::RemoveAt ( int  )
inlineoverridevirtual

Not supported because array represented by the current object is read-only.

Exceptions
NotSupportedExceptionalways

Implements System::Collections::Generic::IList< T >.

◆ rend() [1/2]

template<typename T>
reverse_iterator System::Array< T >::rend ( )
inlinenoexcept

Returns a reverse iterator to the element following the last element of the reversed container. It corresponds to the element preceding the first element of the non-reversed container. This element acts as a placeholder, attempting to access it results in undefined behavior.

Returns
An iterator pointing to the theoretical element preceding the first element of the container.

◆ rend() [2/2]

template<typename T>
const_reverse_iterator System::Array< T >::rend ( ) const
inlinenoexcept

Returns a reverse iterator to the element following the last element of the reversed container. It corresponds to the element preceding the first element of the non-reversed container. This element acts as a placeholder, attempting to access it results in undefined behavior.

Returns
An iterator pointing to the theoretical element preceding the first element of the const-qualified container.

◆ Resize()

template<typename T>
template<typename Type >
static void System::Array< T >::Resize ( ArrayPtr< Type > &  arr,
int  new_size 
)
inlinestatic

Changes the size of the specified array to the specified value or crates new array with specified size.

Parameters
arrArray to resize. If arr is null-pointer, the new array will be created
new_sizeThe new size of the array, or the size of the new array of arr is null

◆ Reverse() [1/2]

template<typename T>
template<typename Type >
static void System::Array< T >::Reverse ( const ArrayPtr< Type > &  arr)
inlinestatic

Reverses elements in the specified array.

Parameters
arrTarget array

◆ Reverse() [2/2]

template<typename T>
template<typename Type >
static void System::Array< T >::Reverse ( const ArrayPtr< Type > &  arr,
int  startIndex,
int  count 
)
inlinestatic

Reverses a range of elements in the specified array.

Parameters
arrTarget array
startIndexIndex in the array at which the range to reverse start
countThe size of the range to reverse

◆ SetTemplateWeakPtr()

template<typename T>
void System::Array< T >::SetTemplateWeakPtr ( uint32_t  argument)
inlineoverridevirtual

Makes array treat stored pointers as weak (if applicable).

Parameters
argumentShould be 0 as there is only one template argument present.

Reimplemented from System::Object.

◆ SetValue()

template<typename T>
void System::Array< T >::SetValue ( const T &  value,
int  index 
)
inline

Sets value of the element at specified index.

Parameters
valueA const reference to the value to set
indexIndex of the element

◆ Sort() [1/6]

template<typename T>
template<typename Type >
static void System::Array< T >::Sort ( const ArrayPtr< Type > &  arr)
inlinestatic

Sorts elements in the specified array using default comparer.

Parameters
arrTarged array

◆ Sort() [2/6]

template<typename T>
template<typename Type >
static void System::Array< T >::Sort ( const ArrayPtr< Type > &  arr,
int  startIndex,
int  count 
)
inlinestatic

Sorts a range of elements in the specified array using default comparer.

Parameters
arrTarged array
startIndexThe index designating the beginning of the range of elements to sort
countThe size of the range of elements to sort

◆ Sort() [3/6]

template<typename T>
template<typename Type >
static void System::Array< T >::Sort ( const ArrayPtr< Type > &  arr,
const SharedPtr< System::Collections::Generic::IComparer< T >> &  comparator 
)
inlinestatic

Sorts elements in the specified array using specified comparer.

Parameters
arrTarged array
comparatorIComparer<T> object used to compare elements of the array

◆ Sort() [4/6]

template<typename T>
template<typename Type , typename Y >
static void System::Array< T >::Sort ( const ArrayPtr< Type > &  arr,
const SharedPtr< System::Collections::Generic::IComparer< Y >> &  comparator 
)
inlinestatic

NOT IMPLEMENTED.

Exceptions
NotImplementedExceptionAlways

◆ Sort() [5/6]

template<typename T>
template<typename TKey , typename TValue >
static void System::Array< T >::Sort ( const ArrayPtr< TKey > &  keys,
const ArrayPtr< TValue > &  items 
)
inlinestatic

Sorts two arrays one containing keys and the other - corresponding items, based on the values of array containing keys, elements of which are compared using operator<.

Parameters
keysArray that contains key values
itemsArray that contains items that are mapped to the key values in keys array
Template Parameters
TKeyThe type of the elements in the keys array
TValuethe type of the elements in the items array

◆ Sort() [6/6]

template<typename T>
template<typename TKey , typename TValue >
static void System::Array< T >::Sort ( const ArrayPtr< TKey > &  keys,
const ArrayPtr< TValue > &  items,
int  index,
int  length 
)
inlinestatic

Sorts two arrays one containing keys and the other - corresponding items, based on the values of array containing keys, elements of which are compared using default comparer.

Parameters
keysArray that contains key values
itemsArray that contains items that are mapped to the key values in keys array
indexThe index designating the beginning of the range to sort
lengthThe number of elements in the range to sort
Template Parameters
TKeyThe type of the elements in the keys array
TValuethe type of the elements in the items array

◆ TrueForAll()

template<typename T>
static bool System::Array< T >::TrueForAll ( System::ArrayPtr< T >  arr,
System::Predicate< T >  match 
)
inlinestatic

Determines whether all elements in the specified array satisfy the conditions defined by specified predicate.

Parameters
arrArray elements of which to match against the conditions
matchA predicate that defines the conditions to match array elements against
Returns
true if all elements of the array arr satisfy the conditions defined by predicate match, otherwise false

◆ virtualizeBeginConstIterator()

template<typename T>
System::Details::VirtualizedIteratorBase<T>* System::Array< T >::virtualizeBeginConstIterator ( ) const
inlineoverridevirtual

Gets the implementation of begin const iterator for the current container.

Returns
Pointer to the newly created iterator kernel object.

Reimplemented from System::Collections::Generic::IEnumerable< T >.

◆ virtualizeBeginIterator()

template<typename T>
System::Details::VirtualizedIteratorBase<T>* System::Array< T >::virtualizeBeginIterator ( )
inlineoverridevirtual

Gets the implementation of begin iterator for the current container.

Returns
Pointer to the newly created iterator kernel object.

Reimplemented from System::Collections::Generic::IEnumerable< T >.

◆ virtualizeEndConstIterator()

template<typename T>
System::Details::VirtualizedIteratorBase<T>* System::Array< T >::virtualizeEndConstIterator ( ) const
inlineoverridevirtual

Gets the implementation of end const iterator for the current container.

Returns
Pointer to the newly created iterator kernel object.

Reimplemented from System::Collections::Generic::IEnumerable< T >.

◆ virtualizeEndIterator()

template<typename T>
System::Details::VirtualizedIteratorBase<T>* System::Array< T >::virtualizeEndIterator ( )
inlineoverridevirtual

Gets the implementation of end iterator for the current container.

Returns
Pointer to the newly created iterator kernel object.

Reimplemented from System::Collections::Generic::IEnumerable< T >.

Member Data Documentation

◆ m_data

template<typename T>
vector_t System::Array< T >::m_data
protected

The storage for array's elements.

◆ m_pointer_mode

template<typename T>
pointer_mode_t System::Array< T >::m_pointer_mode
protected

Information on whether to treat array elements as shared or weak pointers, if applicable.