PST SDK  5.2.0.0-0eac0f6
PSTech::Utils::PstArray< T, Size > Class Template Reference

#include <PstArray.h>

+ Collaboration diagram for PSTech::Utils::PstArray< T, Size >:

Public Types

typedef T value_type
 
typedef size_t size_type
 
typedef T * pointer
 
typedef T & reference
 
typedef T * iterator
 

Public Member Functions

constexpr size_type size () const
 
constexpr bool empty () const
 
const_pointer data () const
 
pointer data ()
 
const_reference at (size_type index) const
 
reference at (size_type index)
 
const_reference front () const
 
reference front ()
 
const_reference back () const
 
reference back ()
 
const_iterator cbegin () const
 
const_iterator begin () const
 
iterator begin ()
 
const_iterator cend () const
 
const_iterator end () const
 
iterator end ()
 
const_reference operator[] (size_type index) const
 
reference operator[] (size_type index)
 
bool operator== (const PstArray< T, Size > &array) const
 
bool operator!= (const PstArray< T, Size > &array) const
 

Public Attributes

const typedef T * const_pointer
 
const typedef T & const_reference
 
const typedef T * const_iterator
 
value_type _array [Size]
 

Private Member Functions

void check_bounds (size_type index)
 

Detailed Description

template<typename T, size_t Size>
class PSTech::Utils::PstArray< T, Size >

Basic array class, cloning std::array<T, Size>. This class can safely be passed across the DLL boundary.

Member Typedef Documentation

◆ iterator

template<typename T , size_t Size>
typedef T* PSTech::Utils::PstArray< T, Size >::iterator

◆ pointer

template<typename T , size_t Size>
typedef T* PSTech::Utils::PstArray< T, Size >::pointer

◆ reference

template<typename T , size_t Size>
typedef T& PSTech::Utils::PstArray< T, Size >::reference

◆ size_type

template<typename T , size_t Size>
typedef size_t PSTech::Utils::PstArray< T, Size >::size_type

◆ value_type

template<typename T , size_t Size>
typedef T PSTech::Utils::PstArray< T, Size >::value_type

Member Function Documentation

◆ at() [1/2]

template<typename T , size_t Size>
reference PSTech::Utils::PstArray< T, Size >::at ( size_type  index)
inline

Get a reference to the item stored at position ‘index’ in the PstArray with bounds check. If ‘index’ is larger than the size of the PstArray, a PSTech::OutOfRangeException is thrown.

Exceptions
PSTech::OutOfRangeException

◆ at() [2/2]

template<typename T , size_t Size>
const_reference PSTech::Utils::PstArray< T, Size >::at ( size_type  index) const
inline

Get a const reference to the item stored at position ‘index’ in the PstArray with bounds check. If ‘index’ is larger than the size of the PstArray, a PSTech::OutOfRangeException is thrown.

Exceptions
PSTech::OutOfRangeException

◆ back() [1/2]

template<typename T , size_t Size>
reference PSTech::Utils::PstArray< T, Size >::back ( )
inline

Get a reference to the last element in the PstArray.

◆ back() [2/2]

template<typename T , size_t Size>
const_reference PSTech::Utils::PstArray< T, Size >::back ( ) const
inline

Get a const reference to the last element in the PstArray.

◆ begin() [1/2]

template<typename T , size_t Size>
iterator PSTech::Utils::PstArray< T, Size >::begin ( )
inline

Get an iterator to the beginning of the PstArray.

◆ begin() [2/2]

template<typename T , size_t Size>
const_iterator PSTech::Utils::PstArray< T, Size >::begin ( ) const
inline

Get a const iterator to the beginning of the PstArray.

◆ cbegin()

template<typename T , size_t Size>
const_iterator PSTech::Utils::PstArray< T, Size >::cbegin ( ) const
inline

Get a const iterator to the beginning of the PstArray.

◆ cend()

template<typename T , size_t Size>
const_iterator PSTech::Utils::PstArray< T, Size >::cend ( ) const
inline

Get a const iterator to the end of the PstArray.

◆ check_bounds()

template<typename T , size_t Size>
void PSTech::Utils::PstArray< T, Size >::check_bounds ( size_type  index)
inlineprivate
+ Here is the caller graph for this function:

◆ data() [1/2]

template<typename T , size_t Size>
pointer PSTech::Utils::PstArray< T, Size >::data ( )
inline

Direct access to the underlying array.

◆ data() [2/2]

template<typename T , size_t Size>
const_pointer PSTech::Utils::PstArray< T, Size >::data ( ) const
inline

Direct access to the underlying array.

◆ empty()

template<typename T , size_t Size>
constexpr bool PSTech::Utils::PstArray< T, Size >::empty ( ) const
inlineconstexpr

Returns true if this PstArray is empty.

◆ end() [1/2]

template<typename T , size_t Size>
iterator PSTech::Utils::PstArray< T, Size >::end ( )
inline

Get an iterator to the end of the PstArray.

◆ end() [2/2]

template<typename T , size_t Size>
const_iterator PSTech::Utils::PstArray< T, Size >::end ( ) const
inline

Get a const iterator to the end of the PstArray.

◆ front() [1/2]

template<typename T , size_t Size>
reference PSTech::Utils::PstArray< T, Size >::front ( )
inline

Get a reference to the first element in the PstArray.

◆ front() [2/2]

template<typename T , size_t Size>
const_reference PSTech::Utils::PstArray< T, Size >::front ( ) const
inline

Get a const reference to the first element in the PstArray.

◆ operator!=()

template<typename T , size_t Size>
bool PSTech::Utils::PstArray< T, Size >::operator!= ( const PstArray< T, Size > &  array) const
inline

Returns true if any element in this PstArray is not equal to the element at the same index in ‘array’.

◆ operator==()

template<typename T , size_t Size>
bool PSTech::Utils::PstArray< T, Size >::operator== ( const PstArray< T, Size > &  array) const
inline

Returns true if each element in this PstArray is equal to the element at the same index in ‘array’.

◆ operator[]() [1/2]

template<typename T , size_t Size>
reference PSTech::Utils::PstArray< T, Size >::operator[] ( size_type  index)
inline

Get a reference to the item stored at position ‘index’ in the PstArray.

◆ operator[]() [2/2]

template<typename T , size_t Size>
const_reference PSTech::Utils::PstArray< T, Size >::operator[] ( size_type  index) const
inline

Get a const reference to the item stored at position ‘index’ in the PstArray.

◆ size()

template<typename T , size_t Size>
constexpr size_type PSTech::Utils::PstArray< T, Size >::size ( ) const
inlineconstexpr

Get the number of elements in this PstArray.

Member Data Documentation

◆ _array

template<typename T , size_t Size>
value_type PSTech::Utils::PstArray< T, Size >::_array[Size]

Public member to enable aggregate initialization. Should not be accessed directly.

◆ const_iterator

template<typename T , size_t Size>
const typedef T* PSTech::Utils::PstArray< T, Size >::const_iterator

◆ const_pointer

template<typename T , size_t Size>
const typedef T* PSTech::Utils::PstArray< T, Size >::const_pointer

◆ const_reference

template<typename T , size_t Size>
const typedef T& PSTech::Utils::PstArray< T, Size >::const_reference

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