OGS
BaseLib::DynamicSpan< T > Struct Template Reference

Detailed Description

template<typename T>
struct BaseLib::DynamicSpan< T >

Definition at line 17 of file DynamicSpan.h.

#include <DynamicSpan.h>

Public Member Functions

template<typename Iterator >
 DynamicSpan (Iterator data_, std::size_t size)
 
T * begin () const
 
T * end () const
 
std::size_t size () const
 
T & operator[] (std::size_t i) const
 

Public Attributes

T * data
 

Private Attributes

std::size_t size_
 

Constructor & Destructor Documentation

◆ DynamicSpan()

template<typename T >
template<typename Iterator >
BaseLib::DynamicSpan< T >::DynamicSpan ( Iterator  data_,
std::size_t  size 
)
inline

Definition at line 20 of file DynamicSpan.h.

21 : data{&*data_ /* manually convert iterator to pointer */}, size_{size}
22 {
23 }
std::size_t size() const
Definition: DynamicSpan.h:27
std::size_t size_
Definition: DynamicSpan.h:33

Member Function Documentation

◆ begin()

template<typename T >
T * BaseLib::DynamicSpan< T >::begin ( ) const
inline

Definition at line 25 of file DynamicSpan.h.

25{ return data; }

References BaseLib::DynamicSpan< T >::data.

◆ end()

template<typename T >
T * BaseLib::DynamicSpan< T >::end ( ) const
inline

Definition at line 26 of file DynamicSpan.h.

26{ return data + size_; }

References BaseLib::DynamicSpan< T >::data, and BaseLib::DynamicSpan< T >::size_.

◆ operator[]()

template<typename T >
T & BaseLib::DynamicSpan< T >::operator[] ( std::size_t  i) const
inline

Definition at line 28 of file DynamicSpan.h.

28{ return data[i]; }

References BaseLib::DynamicSpan< T >::data.

◆ size()

template<typename T >
std::size_t BaseLib::DynamicSpan< T >::size ( ) const
inline

Definition at line 27 of file DynamicSpan.h.

27{ return size_; }

References BaseLib::DynamicSpan< T >::size_.

Member Data Documentation

◆ data

◆ size_

template<typename T >
std::size_t BaseLib::DynamicSpan< T >::size_
private

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