Template Class Array
Defined in File Array.h
Class Documentation
-
template<typename T>
class Array Simple DLL-safe array of objects.
Simple array type used to pass arrays of objects across the DLL boundary.
- Template Parameters
T – : Object type to store in the array
Public Functions
-
inline Array()
Constructs an array with 0 elements.
-
inline explicit Array(const size_t Size)
Constructs an array with the given number of elements.
Each element in the array will have it’s default constuctor called.
- Parameters
Size – const size_t : Number of elements in the array
-
inline Array(const T *Buffer, size_t Size)
Constructs an array from a buffer.
- Parameters
Buffer – const T* : Pointer to the beginning of the buffer
Size – size_t : Number of elements in the buffer
-
inline Array(std::initializer_list<T> List)
Constructs an array from an initializer_list.
- Parameters
List – std::initializer_list : Elements to construct the array from
-
inline ~Array()
Destructor.
Frees array memory.
-
inline Array<T> &operator=(const Array<T> &Other)
Copy assignment.
- Parameters
Other – const Array<T>&
- Returns
Array<T>&
-
inline T &operator[](const size_t Index)
Returns an element at the given index of the array.
- Parameters
Index – const size_t : Element index to access
- Returns
T& : Array element
-
inline const T &operator[](const size_t Index) const
Returns a const element at the given index of the array.
- Parameters
Index – const size_t : Element index to access
- Returns
const T& : Array element
-
inline const size_t Size() const
Returns the number of elements in the array.
- Returns
const size_t
-
inline bool IsEmpty() const
Checks if the array has any elements.
- Returns
bool