SPH
Public Member Functions | Friends | List of all members
ArrayRef< T > Class Template Reference

#include <ArrayRef.h>

Public Member Functions

 ArrayRef ()=default
 
 ArrayRef (ArrayView< T > data, const RefEnum type)
 
 ArrayRef (ArrayRef &&other)
 
ArrayRefoperator= (ArrayRef &&other)
 
INLINE T & operator[] (const Size idx)
 
INLINE const T & operator[] (const Size idx) const
 
INLINE Size size () const
 
INLINE bool empty () const
 
INLINE bool owns () const
 Returns true if the referenced data are held by the object. More...
 
void seize ()
 Copies the referenced buffer into the internal storage, if not already owning the buffer. More...
 
Iterator< T > begin ()
 
Iterator< const T > begin () const
 
Iterator< T > end ()
 
Iterator< const T > end () const
 
 operator ArrayRef< const T > () &&
 
 operator ArrayView< T > ()
 
 operator ArrayView< const T > () const
 

Friends

class ArrayRef< std::remove_const_t< T > >
 

Detailed Description

template<typename T>
class ArrayRef< T >

Definition at line 18 of file ArrayRef.h.

Constructor & Destructor Documentation

◆ ArrayRef() [1/3]

template<typename T >
ArrayRef< T >::ArrayRef ( )
default

◆ ArrayRef() [2/3]

template<typename T >
ArrayRef< T >::ArrayRef ( ArrayView< T >  data,
const RefEnum  type 
)
inline

Definition at line 31 of file ArrayRef.h.

◆ ArrayRef() [3/3]

template<typename T >
ArrayRef< T >::ArrayRef ( ArrayRef< T > &&  other)
inline

Definition at line 43 of file ArrayRef.h.

Member Function Documentation

◆ begin() [1/2]

template<typename T >
Iterator<T> ArrayRef< T >::begin ( )
inline

Definition at line 89 of file ArrayRef.h.

◆ begin() [2/2]

template<typename T >
Iterator<const T> ArrayRef< T >::begin ( ) const
inline

Definition at line 93 of file ArrayRef.h.

◆ empty()

template<typename T >
INLINE bool ArrayRef< T >::empty ( ) const
inline

Definition at line 66 of file ArrayRef.h.

◆ end() [1/2]

template<typename T >
Iterator<T> ArrayRef< T >::end ( )
inline

Definition at line 97 of file ArrayRef.h.

◆ end() [2/2]

template<typename T >
Iterator<const T> ArrayRef< T >::end ( ) const
inline

Definition at line 101 of file ArrayRef.h.

◆ operator ArrayRef< const T >()

template<typename T >
ArrayRef< T >::operator ArrayRef< const T > ( ) &&
inline

Definition at line 105 of file ArrayRef.h.

◆ operator ArrayView< const T >()

template<typename T >
ArrayRef< T >::operator ArrayView< const T > ( ) const
inline

Definition at line 116 of file ArrayRef.h.

◆ operator ArrayView< T >()

template<typename T >
ArrayRef< T >::operator ArrayView< T > ( )
inline

Definition at line 112 of file ArrayRef.h.

◆ operator=()

template<typename T >
ArrayRef& ArrayRef< T >::operator= ( ArrayRef< T > &&  other)
inline

Definition at line 48 of file ArrayRef.h.

◆ operator[]() [1/2]

template<typename T >
INLINE T& ArrayRef< T >::operator[] ( const Size  idx)
inline

Definition at line 54 of file ArrayRef.h.

◆ operator[]() [2/2]

template<typename T >
INLINE const T& ArrayRef< T >::operator[] ( const Size  idx) const
inline

Definition at line 58 of file ArrayRef.h.

◆ owns()

template<typename T >
INLINE bool ArrayRef< T >::owns ( ) const
inline

Returns true if the referenced data are held by the object.

Definition at line 71 of file ArrayRef.h.

◆ seize()

template<typename T >
void ArrayRef< T >::seize ( )
inline

Copies the referenced buffer into the internal storage, if not already owning the buffer.

The external referenced buffer is not modified. It can be later safely modified without invalidating data stored in this object.

Definition at line 79 of file ArrayRef.h.

◆ size()

template<typename T >
INLINE Size ArrayRef< T >::size ( ) const
inline

Definition at line 62 of file ArrayRef.h.

Friends And Related Function Documentation

◆ ArrayRef< std::remove_const_t< T > >

template<typename T >
friend class ArrayRef< std::remove_const_t< T > >
friend

Definition at line 153 of file ArrayRef.h.


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