CubbyFlow::ArrayBase< T, N, DerivedArray > Class Template Reference

#include <Core/Array/ArrayBase.hpp>

Inheritance diagram for CubbyFlow::ArrayBase< T, N, DerivedArray >:
CubbyFlow::Array< char > CubbyFlow::Array< CubbyFlow::Array > CubbyFlow::Array< CubbyFlow::Array< size_t > > CubbyFlow::Array< CubbyFlow::BoundingBox< double, N > > CubbyFlow::Array< CubbyFlow::Matrix > CubbyFlow::Array< CubbyFlow::Matrix< double, N > > CubbyFlow::Array< CubbyFlow::Matrix< double, N >, N > CubbyFlow::Array< double > CubbyFlow::Array< double, N > CubbyFlow::Array< FDMMatrixRow2 > CubbyFlow::Array< FDMMatrixRow3 > CubbyFlow::Array< Node > CubbyFlow::Array< size_t > CubbyFlow::Array< std::shared_ptr< CubbyFlow::Collider< N > > > CubbyFlow::Array< std::shared_ptr< CubbyFlow::ImplicitSurface< N > > > CubbyFlow::Array< std::shared_ptr< CubbyFlow::Surface< N > > > CubbyFlow::Array< Vector3UZ >

Public Types

using Derived = DerivedArray
 
using ValueType = T
 
using Reference = T &
 
using ConstReference = const T &
 
using Pointer = T *
 
using ConstPointer = const T *
 
using Iterator = T *
 
using ConstIterator = const T *
 

Public Member Functions

size_t Index (size_t i) const
 
template<typename... Args>
size_t Index (size_t i, Args... args) const
 
template<size_t... I>
size_t Index (const Vector< size_t, N > &idx) const
 
Pointer data ()
 
ConstPointer data () const
 
const Vector< size_t, N > & Size () const
 
template<size_t M = N>
std::enable_if_t<(M > 0), size_t > Width () const
 
template<size_t M = N>
std::enable_if_t<(M > 1), size_t > Height () const
 
template<size_t M = N>
std::enable_if_t<(M > 2), size_t > Depth () const
 
bool IsEmpty () const
 
size_t Length () const
 
Iterator begin ()
 
ConstIterator begin () const
 
Iterator end ()
 
ConstIterator end () const
 
Iterator rbegin ()
 
ConstIterator rbegin () const
 
Iterator rend ()
 
ConstIterator rend () const
 
Reference At (size_t i)
 
ConstReference At (size_t i) const
 
template<typename... Args>
Reference At (size_t i, Args... args)
 
template<typename... Args>
ConstReference At (size_t i, Args... args) const
 
Reference At (const Vector< size_t, N > &idx)
 
ConstReference At (const Vector< size_t, N > &idx) const
 
Reference operator[] (size_t i)
 
ConstReference operator[] (size_t i) const
 
template<typename... Args>
Reference operator() (size_t i, Args... args)
 
template<typename... Args>
ConstReference operator() (size_t i, Args... args) const
 
Reference operator() (const Vector< size_t, N > &idx)
 
ConstReference operator() (const Vector< size_t, N > &idx) const
 
template<size_t M>
std::enable_if_t<(M > 0), size_t > Width () const
 
template<size_t M>
std::enable_if_t<(M > 1), size_t > Height () const
 
template<size_t M>
std::enable_if_t<(M > 2), size_t > Depth () const
 
template<typename... Args>
T & At (size_t i, Args... args)
 
template<typename... Args>
const T & At (size_t i, Args... args) const
 
template<typename... Args>
T & operator() (size_t i, Args... args)
 
template<typename... Args>
const T & operator() (size_t i, Args... args) const
 

Protected Member Functions

 ArrayBase ()
 
virtual ~ArrayBase ()=default
 
 ArrayBase (const ArrayBase &other)
 
 ArrayBase (ArrayBase &&other) noexcept
 
ArrayBaseoperator= (const ArrayBase &other)
 
ArrayBaseoperator= (ArrayBase &&other) noexcept
 
template<typename... Args>
void SetPtrAndSize (Pointer ptr, size_t ni, Args... args)
 
void SetPtrAndSize (Pointer data, Vector< size_t, N > size)
 
void SwapPtrAndSize (ArrayBase &other)
 
void ClearPtrAndSize ()
 

Protected Attributes

Pointer m_ptr = nullptr
 
Vector< size_t, N > m_size
 

Member Typedef Documentation

◆ ConstIterator

template<typename T, size_t N, typename DerivedArray>
using CubbyFlow::ArrayBase< T, N, DerivedArray >::ConstIterator = const T*

◆ ConstPointer

template<typename T, size_t N, typename DerivedArray>
using CubbyFlow::ArrayBase< T, N, DerivedArray >::ConstPointer = const T*

◆ ConstReference

template<typename T, size_t N, typename DerivedArray>
using CubbyFlow::ArrayBase< T, N, DerivedArray >::ConstReference = const T&

◆ Derived

template<typename T, size_t N, typename DerivedArray>
using CubbyFlow::ArrayBase< T, N, DerivedArray >::Derived = DerivedArray

◆ Iterator

template<typename T, size_t N, typename DerivedArray>
using CubbyFlow::ArrayBase< T, N, DerivedArray >::Iterator = T*

◆ Pointer

template<typename T, size_t N, typename DerivedArray>
using CubbyFlow::ArrayBase< T, N, DerivedArray >::Pointer = T*

◆ Reference

template<typename T, size_t N, typename DerivedArray>
using CubbyFlow::ArrayBase< T, N, DerivedArray >::Reference = T&

◆ ValueType

template<typename T, size_t N, typename DerivedArray>
using CubbyFlow::ArrayBase< T, N, DerivedArray >::ValueType = T

Constructor & Destructor Documentation

◆ ArrayBase() [1/3]

template<typename T , size_t N, typename D >
CubbyFlow::ArrayBase< T, N, D >::ArrayBase ( )
protected

◆ ~ArrayBase()

template<typename T, size_t N, typename DerivedArray>
virtual CubbyFlow::ArrayBase< T, N, DerivedArray >::~ArrayBase ( )
protectedvirtualdefault

◆ ArrayBase() [2/3]

template<typename T , size_t N, typename D >
CubbyFlow::ArrayBase< T, N, D >::ArrayBase ( const ArrayBase< T, N, DerivedArray > &  other)
protected

◆ ArrayBase() [3/3]

template<typename T , size_t N, typename D >
CubbyFlow::ArrayBase< T, N, D >::ArrayBase ( ArrayBase< T, N, DerivedArray > &&  other)
protectednoexcept

Member Function Documentation

◆ At() [1/8]

template<typename T , size_t N, typename D >
T & CubbyFlow::ArrayBase< T, N, D >::At ( size_t  i)

◆ At() [2/8]

template<typename T , size_t N, typename D >
const T & CubbyFlow::ArrayBase< T, N, D >::At ( size_t  i) const

◆ At() [3/8]

template<typename T, size_t N, typename DerivedArray>
template<typename... Args>
Reference CubbyFlow::ArrayBase< T, N, DerivedArray >::At ( size_t  i,
Args...  args 
)

◆ At() [4/8]

template<typename T, size_t N, typename DerivedArray>
template<typename... Args>
ConstReference CubbyFlow::ArrayBase< T, N, DerivedArray >::At ( size_t  i,
Args...  args 
) const

◆ At() [5/8]

template<typename T , size_t N, typename D >
T & CubbyFlow::ArrayBase< T, N, D >::At ( const Vector< size_t, N > &  idx)

◆ At() [6/8]

template<typename T , size_t N, typename D >
const T & CubbyFlow::ArrayBase< T, N, D >::At ( const Vector< size_t, N > &  idx) const

◆ At() [7/8]

template<typename T, size_t N, typename DerivedArray>
template<typename... Args>
T& CubbyFlow::ArrayBase< T, N, DerivedArray >::At ( size_t  i,
Args...  args 
)

◆ At() [8/8]

template<typename T, size_t N, typename DerivedArray>
template<typename... Args>
const T& CubbyFlow::ArrayBase< T, N, DerivedArray >::At ( size_t  i,
Args...  args 
) const

◆ begin() [1/2]

template<typename T , size_t N, typename D >
ArrayBase< T, N, D >::Iterator CubbyFlow::ArrayBase< T, N, D >::begin ( )

◆ begin() [2/2]

template<typename T , size_t N, typename D >
ArrayBase< T, N, D >::ConstIterator CubbyFlow::ArrayBase< T, N, D >::begin ( ) const

◆ ClearPtrAndSize()

template<typename T , size_t N, typename D >
void CubbyFlow::ArrayBase< T, N, D >::ClearPtrAndSize ( )
protected

◆ data() [1/2]

template<typename T , size_t N, typename D >
T * CubbyFlow::ArrayBase< T, N, D >::data ( )

◆ data() [2/2]

template<typename T , size_t N, typename D >
const T * CubbyFlow::ArrayBase< T, N, D >::data ( ) const

◆ Depth() [1/2]

template<typename T, size_t N, typename DerivedArray>
template<size_t M = N>
std::enable_if_t<(M > 2), size_t> CubbyFlow::ArrayBase< T, N, DerivedArray >::Depth ( ) const

◆ Depth() [2/2]

template<typename T, size_t N, typename DerivedArray>
template<size_t M>
std::enable_if_t<(M > 2), size_t> CubbyFlow::ArrayBase< T, N, DerivedArray >::Depth ( ) const

◆ end() [1/2]

template<typename T , size_t N, typename D >
ArrayBase< T, N, D >::Iterator CubbyFlow::ArrayBase< T, N, D >::end ( )

◆ end() [2/2]

template<typename T , size_t N, typename D >
ArrayBase< T, N, D >::ConstIterator CubbyFlow::ArrayBase< T, N, D >::end ( ) const

◆ Height() [1/2]

template<typename T, size_t N, typename DerivedArray>
template<size_t M = N>
std::enable_if_t<(M > 1), size_t> CubbyFlow::ArrayBase< T, N, DerivedArray >::Height ( ) const

◆ Height() [2/2]

template<typename T, size_t N, typename DerivedArray>
template<size_t M>
std::enable_if_t<(M > 1), size_t> CubbyFlow::ArrayBase< T, N, DerivedArray >::Height ( ) const

◆ Index() [1/3]

template<typename T , size_t N, typename D >
size_t CubbyFlow::ArrayBase< T, N, D >::Index ( size_t  i) const

◆ Index() [2/3]

template<typename T , size_t N, typename D >
template<typename... Args>
size_t CubbyFlow::ArrayBase< T, N, D >::Index ( size_t  i,
Args...  args 
) const

◆ Index() [3/3]

template<typename T , size_t N, typename D >
template<size_t... I>
size_t CubbyFlow::ArrayBase< T, N, D >::Index ( const Vector< size_t, N > &  idx) const

◆ IsEmpty()

template<typename T , size_t N, typename D >
bool CubbyFlow::ArrayBase< T, N, D >::IsEmpty ( ) const

◆ Length()

template<typename T , size_t N, typename D >
size_t CubbyFlow::ArrayBase< T, N, D >::Length ( ) const

◆ operator()() [1/6]

template<typename T, size_t N, typename DerivedArray>
template<typename... Args>
Reference CubbyFlow::ArrayBase< T, N, DerivedArray >::operator() ( size_t  i,
Args...  args 
)

◆ operator()() [2/6]

template<typename T, size_t N, typename DerivedArray>
template<typename... Args>
ConstReference CubbyFlow::ArrayBase< T, N, DerivedArray >::operator() ( size_t  i,
Args...  args 
) const

◆ operator()() [3/6]

template<typename T , size_t N, typename D >
T & CubbyFlow::ArrayBase< T, N, D >::operator() ( const Vector< size_t, N > &  idx)

◆ operator()() [4/6]

template<typename T , size_t N, typename D >
const T & CubbyFlow::ArrayBase< T, N, D >::operator() ( const Vector< size_t, N > &  idx) const

◆ operator()() [5/6]

template<typename T, size_t N, typename DerivedArray>
template<typename... Args>
T& CubbyFlow::ArrayBase< T, N, DerivedArray >::operator() ( size_t  i,
Args...  args 
)

◆ operator()() [6/6]

template<typename T, size_t N, typename DerivedArray>
template<typename... Args>
const T& CubbyFlow::ArrayBase< T, N, DerivedArray >::operator() ( size_t  i,
Args...  args 
) const

◆ operator=() [1/2]

template<typename T , size_t N, typename D >
ArrayBase< T, N, D > & CubbyFlow::ArrayBase< T, N, D >::operator= ( const ArrayBase< T, N, DerivedArray > &  other)
protected

◆ operator=() [2/2]

template<typename T , size_t N, typename D >
ArrayBase< T, N, D > & CubbyFlow::ArrayBase< T, N, D >::operator= ( ArrayBase< T, N, DerivedArray > &&  other)
protectednoexcept

◆ operator[]() [1/2]

template<typename T , size_t N, typename D >
T & CubbyFlow::ArrayBase< T, N, D >::operator[] ( size_t  i)

◆ operator[]() [2/2]

template<typename T , size_t N, typename D >
const T & CubbyFlow::ArrayBase< T, N, D >::operator[] ( size_t  i) const

◆ rbegin() [1/2]

template<typename T , size_t N, typename D >
ArrayBase< T, N, D >::Iterator CubbyFlow::ArrayBase< T, N, D >::rbegin ( )

◆ rbegin() [2/2]

template<typename T , size_t N, typename D >
ArrayBase< T, N, D >::ConstIterator CubbyFlow::ArrayBase< T, N, D >::rbegin ( ) const

◆ rend() [1/2]

template<typename T , size_t N, typename D >
ArrayBase< T, N, D >::Iterator CubbyFlow::ArrayBase< T, N, D >::rend ( )

◆ rend() [2/2]

template<typename T , size_t N, typename D >
ArrayBase< T, N, D >::ConstIterator CubbyFlow::ArrayBase< T, N, D >::rend ( ) const

◆ SetPtrAndSize() [1/2]

template<typename T , size_t N, typename D >
template<typename... Args>
void CubbyFlow::ArrayBase< T, N, D >::SetPtrAndSize ( Pointer  ptr,
size_t  ni,
Args...  args 
)
protected

◆ SetPtrAndSize() [2/2]

template<typename T , size_t N, typename D >
void CubbyFlow::ArrayBase< T, N, D >::SetPtrAndSize ( Pointer  data,
Vector< size_t, N >  size 
)
protected

◆ Size()

template<typename T , size_t N, typename D >
const Vector< size_t, N > & CubbyFlow::ArrayBase< T, N, D >::Size ( ) const

◆ SwapPtrAndSize()

template<typename T , size_t N, typename D >
void CubbyFlow::ArrayBase< T, N, D >::SwapPtrAndSize ( ArrayBase< T, N, DerivedArray > &  other)
protected

◆ Width() [1/2]

template<typename T, size_t N, typename DerivedArray>
template<size_t M = N>
std::enable_if_t<(M > 0), size_t> CubbyFlow::ArrayBase< T, N, DerivedArray >::Width ( ) const

◆ Width() [2/2]

template<typename T, size_t N, typename DerivedArray>
template<size_t M>
std::enable_if_t<(M > 0), size_t> CubbyFlow::ArrayBase< T, N, DerivedArray >::Width ( ) const

Member Data Documentation

◆ m_ptr

template<typename T, size_t N, typename DerivedArray>
Pointer CubbyFlow::ArrayBase< T, N, DerivedArray >::m_ptr = nullptr
protected

◆ m_size

template<typename T, size_t N, typename DerivedArray>
Vector<size_t, N> CubbyFlow::ArrayBase< T, N, DerivedArray >::m_size
protected

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