span< T > Class Template Reference

Public Types

using iterator = T *
 
using constIterator = const T *
 
using reference = T &
 
using constReference = const T &
 
using valueType = T
 
using pointer = T *
 
using constPointer = const T *
 

Public Member Functions

 TypeInfoTemplateNV ("span", T)
 
INLINE_FUNCTION_HD span ()=default
 Constructor. More...
 
INLINE_FUNCTION_HD span (T *data, label size)
 
INLINE_FUNCTION_HD span (const span &)=default
 copy More...
 
INLINE_FUNCTION_HD spanoperator= (const span &)=default
 assignment More...
 
INLINE_FUNCTION_HD span (span &&)=delete
 move More...
 
INLINE_FUNCTION_HD spanoperator= (span &)=delete
 assignment More...
 
INLINE_FUNCTION_HD bool empty () const
 
INLINE_FUNCTION_HD T * data () const
 
INLINE_FUNCTION_HD label size () const
 Returns the number of elements in the span. More...
 
INLINE_FUNCTION_HD constIterator begin () const
 Returns an iterator to the beginning of the span. More...
 
INLINE_FUNCTION_HD constIterator cbegin () const
 Returns an iterator to the beginning of the span. More...
 
INLINE_FUNCTION_HD constIterator end () const
 Returns an iterator to one past the end of the span. More...
 
INLINE_FUNCTION_HD constIterator cend () const
 Returns an iterator to one past the end of the span. More...
 
INLINE_FUNCTION_HD T & operator[] (int32 i)
 
const INLINE_FUNCTION_HD T & operator[] (int32 i) const
 
INLINE_FUNCTION_HD T & operator[] (label i)
 
const INLINE_FUNCTION_HD T & operator[] (label i) const
 

Protected Attributes

T * data_ = nullptr
 
label size_ = 0
 

Detailed Description

template<typename T>
class pFlow::span< T >

Definition at line 31 of file span.hpp.

Member Typedef Documentation

◆ iterator

using iterator = T*

Definition at line 36 of file span.hpp.

◆ constIterator

using constIterator = const T*

Definition at line 38 of file span.hpp.

◆ reference

using reference = T&

Definition at line 40 of file span.hpp.

◆ constReference

using constReference = const T&

Definition at line 42 of file span.hpp.

◆ valueType

using valueType = T

Definition at line 44 of file span.hpp.

◆ pointer

using pointer = T*

Definition at line 46 of file span.hpp.

◆ constPointer

using constPointer = const T*

Definition at line 48 of file span.hpp.

Constructor & Destructor Documentation

◆ span() [1/4]

INLINE_FUNCTION_HD span ( )
default

Constructor.

◆ span() [2/4]

INLINE_FUNCTION_HD span ( T *  data,
label  size 
)
inline

Definition at line 66 of file span.hpp.

◆ span() [3/4]

INLINE_FUNCTION_HD span ( const span< T > &  )
default

copy

◆ span() [4/4]

INLINE_FUNCTION_HD span ( span< T > &&  )
delete

move

Member Function Documentation

◆ TypeInfoTemplateNV()

TypeInfoTemplateNV ( "span< T >"  ,
 
)

◆ operator=() [1/2]

INLINE_FUNCTION_HD span& operator= ( const span< T > &  )
default

assignment

◆ operator=() [2/2]

INLINE_FUNCTION_HD span& operator= ( span< T > &  )
delete

assignment

◆ empty()

INLINE_FUNCTION_HD bool empty ( ) const
inline

Definition at line 88 of file span.hpp.

References span< T >::size_.

◆ data()

INLINE_FUNCTION_HD T* data ( ) const
inline

Definition at line 94 of file span.hpp.

References span< T >::data_.

◆ size()

INLINE_FUNCTION_HD label size ( ) const
inline

Returns the number of elements in the span.

Definition at line 101 of file span.hpp.

References span< T >::size_.

Referenced by pFlow::operator<<().

Here is the caller graph for this function:

◆ begin()

INLINE_FUNCTION_HD constIterator begin ( ) const
inline

Returns an iterator to the beginning of the span.

Definition at line 108 of file span.hpp.

References span< T >::data_.

◆ cbegin()

INLINE_FUNCTION_HD constIterator cbegin ( ) const
inline

Returns an iterator to the beginning of the span.

Definition at line 115 of file span.hpp.

References span< T >::data_.

◆ end()

INLINE_FUNCTION_HD constIterator end ( ) const
inline

Returns an iterator to one past the end of the span.

Definition at line 122 of file span.hpp.

References span< T >::data_, and span< T >::size_.

◆ cend()

INLINE_FUNCTION_HD constIterator cend ( ) const
inline

Returns an iterator to one past the end of the span.

Definition at line 129 of file span.hpp.

References span< T >::data_, and span< T >::size_.

◆ operator[]() [1/4]

INLINE_FUNCTION_HD T& operator[] ( int32  i)
inline

Definition at line 135 of file span.hpp.

References span< T >::data_.

◆ operator[]() [2/4]

const INLINE_FUNCTION_HD T& operator[] ( int32  i) const
inline

Definition at line 141 of file span.hpp.

References span< T >::data_.

◆ operator[]() [3/4]

INLINE_FUNCTION_HD T& operator[] ( label  i)
inline

Definition at line 147 of file span.hpp.

References span< T >::data_.

◆ operator[]() [4/4]

const INLINE_FUNCTION_HD T& operator[] ( label  i) const
inline

Definition at line 153 of file span.hpp.

References span< T >::data_.

Member Data Documentation

◆ data_

T* data_ = nullptr
protected

◆ size_

label size_ = 0
protected

Definition at line 54 of file span.hpp.

Referenced by span< T >::cend(), span< T >::empty(), span< T >::end(), and span< T >::size().


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