R-Type
R-Type project
KapMirror::ArraySegment< T > Class Template Reference

Public Member Functions

 ArraySegment (T *_array, int _size)
 
 ArraySegment (T *_array, int _offset, int _size)
 
T * toArray () const
 Get the array. More...
 
 operator T* () const
 
int getOffset () const
 Get the offset of the array. More...
 
int getSize () const
 Get the size of the array. More...
 
T & operator[] (int index)
 
bool operator== (ArraySegment< T > const &other)
 
bool operator!= (ArraySegment< T > const &other)
 
ArraySegment< T > & operator= (ArraySegment< T > const &other)
 

Static Public Member Functions

static std::shared_ptr< ArraySegment< T > > createArraySegment (T *array, int size)
 
static std::shared_ptr< ArraySegment< T > > createArraySegment (T *array, int offset, int size)
 

Member Function Documentation

◆ getOffset()

template<typename T >
int KapMirror::ArraySegment< T >::getOffset ( ) const
inline

Get the offset of the array.

Returns
Offset

◆ getSize()

template<typename T >
int KapMirror::ArraySegment< T >::getSize ( ) const
inline

Get the size of the array.

Returns
Size

◆ toArray()

template<typename T >
T* KapMirror::ArraySegment< T >::toArray ( ) const
inline

Get the array.

Returns
Array

The documentation for this class was generated from the following file: