Array type implementation. More...
#include <BasicMonoStructures.hpp>
Public Member Functions | |
| IL2CPP::il2cpp_array_size_t | GetCapacity () const |
| Get array size. | |
| IL2CPP::il2cpp_array_size_t | GetSize () const |
| Get array size. | |
| T * | GetData () const |
| Get array data pointer. | |
| std::vector< T > | ToVector () const |
| Convert array to std::vector. | |
| bool | CopyFrom (const std::vector< T > &vec) |
| Copy data from vector to current array. | |
| bool | CopyFrom (T *arr, IL2CPP::il2cpp_array_size_t size) |
| Copy data from pointer to current array. | |
| void | CopyTo (T *arr) const |
| Copy data from current array to some pointer. | |
| Utils::DataIterator< T > | At (IL2CPP::il2cpp_array_size_t index) const |
| Get element at index. | |
| Utils::DataIterator< T > | operator[] (IL2CPP::il2cpp_array_size_t index) const |
| bool | Empty () const |
| Check if array is empty. | |
| void | Destroy () |
| Destroy array. | |
| bool | SelfCheck () const |
| Check if array isn't null. | |
| constexpr | Array () |
| Create empty array. | |
Static Public Member Functions | |
| static Array< T > * | Create (size_t capacity, bool _forceUseAlloc=false) |
| Creates new empty array of set capacity. | |
| static Array< T > * | Create (const std::vector< T > &vec, bool _forceUseAlloc=false) |
| Creates new array using data from set vector. | |
| static Array< T > * | Create (T *arr, size_t size, bool _forceUseAlloc=false) |
| Creates new array using data from set pointer. | |
Public Attributes | |
| IL2CPP::Il2CppArrayBounds * | bounds {} |
| IL2CPP::il2cpp_array_size_t | capacity {} |
| T | m_Items [0] |
Array type implementation.
| T | Element type |
|
inline |
Get element at index.
|
inline |
Copy data from vector to current array.
| vec | Source vector |
|
inline |
Copy data from pointer to current array.
| arr | Source pointer |
| size | Source pointer size |
|
inlinestatic |
Creates new array using data from set vector.
| vec | Source vector |
| _forceUseAlloc | Forces code to create array using BNM::Allocate instead of BNM::Class::NewArray (Advanced usage only). |
|
inlinestatic |
Creates new empty array of set capacity.
| capacity | Size of new array |
| _forceUseAlloc | Forces code to create array using BNM::Allocate instead of BNM::Class::NewArray (Advanced usage only). |
|
inlinestatic |
Creates new array using data from set pointer.
| arr | Source pointer |
| size | Source pointer size |
| _forceUseAlloc | Forces code to create array using BNM::Allocate instead of BNM::Class::NewArray (Advanced usage only). |
|
inline |
Destroy array.
Frees allocated memory for array.
|
inlinenodiscard |
Check if array is empty.
|
inlinenodiscard |
Get array size.
|
inlinenodiscard |
Get array data pointer.
|
inlinenodiscard |
|
inlinenodiscard |
Check if array isn't null.
Checks if array is not null and logs if it's null. It's used mostly internally in debug builds to crash proof code.
|
inlinenodiscard |
Convert array to std::vector.