Arcane  4.2.1.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::ArrayRange< T > Class Template Reference

Interval over Arccore array classes. More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/base/arccore/base/ArrayRange.h>

Collaboration diagram for Arcane::ArrayRange< T >:

Public Types

using value_type = TraitsType_::value_type
using difference_type = TraitsType_::difference_type
using reference = TraitsType_::reference
using pointer = TraitsType_::pointer
using const_pointer = const value_type*
using iterator = ArrayIterator<pointer>
 Type of the iterator for an element of the array.
using const_iterator = ArrayIterator<const_pointer>
 Type of the constant iterator for an element of the array.

Public Member Functions

 ArrayRange ()=default
 Constructs an empty range.
 ArrayRange (pointer abegin, pointer aend) noexcept
 Constructs a range going from abegin to aend.
iterator begin ()
 Returns an iterator to the first element of the array.
iterator end ()
 Returns an iterator to the first element after the end of the array.
const_iterator begin () const
 Returns a constant iterator to the first element of the array.
const_iterator end () const
 Returns a constant iterator to the first element after the end of the array.
value_type * data ()
 Pointer to the underlying array.
const value_type * data () const
 Constant pointer to the underlying array.
bool empty () const
 Indicates if the array is empty.

Protected Types

using TraitsType_ = Arcane::Impl::ArrayIteratorTraits<T>

Private Attributes

m_begin = nullptr
m_end = nullptr

Detailed Description

template<typename T>
class Arcane::ArrayRange< T >

Interval over Arccore array classes.

This class is used to adapt array classes to STL iterators. It provides methods such as begin()/end().

Definition at line 34 of file arccore/src/base/arccore/base/ArrayRange.h.

Member Typedef Documentation

◆ const_iterator

template<typename T>
using Arcane::ArrayRange< T >::const_iterator = ArrayIterator<const_pointer>

Type of the constant iterator for an element of the array.

Definition at line 51 of file arccore/src/base/arccore/base/ArrayRange.h.

◆ const_pointer

template<typename T>
using Arcane::ArrayRange< T >::const_pointer = const value_type*

Definition at line 47 of file arccore/src/base/arccore/base/ArrayRange.h.

◆ difference_type

template<typename T>
using Arcane::ArrayRange< T >::difference_type = TraitsType_::difference_type

Definition at line 43 of file arccore/src/base/arccore/base/ArrayRange.h.

◆ iterator

template<typename T>
using Arcane::ArrayRange< T >::iterator = ArrayIterator<pointer>

Type of the iterator for an element of the array.

Definition at line 49 of file arccore/src/base/arccore/base/ArrayRange.h.

◆ pointer

template<typename T>
using Arcane::ArrayRange< T >::pointer = TraitsType_::pointer

Definition at line 45 of file arccore/src/base/arccore/base/ArrayRange.h.

◆ reference

template<typename T>
using Arcane::ArrayRange< T >::reference = TraitsType_::reference

Definition at line 44 of file arccore/src/base/arccore/base/ArrayRange.h.

◆ TraitsType_

template<typename T>
using Arcane::ArrayRange< T >::TraitsType_ = Arcane::Impl::ArrayIteratorTraits<T>
protected

Definition at line 38 of file arccore/src/base/arccore/base/ArrayRange.h.

◆ value_type

template<typename T>
using Arcane::ArrayRange< T >::value_type = TraitsType_::value_type

Definition at line 42 of file arccore/src/base/arccore/base/ArrayRange.h.

Constructor & Destructor Documentation

◆ ArrayRange()

template<typename T>
Arcane::ArrayRange< T >::ArrayRange ( pointer abegin,
pointer aend )
inlinenoexcept

Constructs a range going from abegin to aend.

Definition at line 59 of file arccore/src/base/arccore/base/ArrayRange.h.

Member Function Documentation

◆ begin() [1/2]

template<typename T>
iterator Arcane::ArrayRange< T >::begin ( )
inline

Returns an iterator to the first element of the array.

Definition at line 67 of file arccore/src/base/arccore/base/ArrayRange.h.

◆ begin() [2/2]

template<typename T>
const_iterator Arcane::ArrayRange< T >::begin ( ) const
inline

Returns a constant iterator to the first element of the array.

Definition at line 71 of file arccore/src/base/arccore/base/ArrayRange.h.

◆ data() [1/2]

template<typename T>
value_type * Arcane::ArrayRange< T >::data ( )
inline

Pointer to the underlying array.

Definition at line 76 of file arccore/src/base/arccore/base/ArrayRange.h.

◆ data() [2/2]

template<typename T>
const value_type * Arcane::ArrayRange< T >::data ( ) const
inline

Constant pointer to the underlying array.

Definition at line 78 of file arccore/src/base/arccore/base/ArrayRange.h.

◆ empty()

template<typename T>
bool Arcane::ArrayRange< T >::empty ( ) const
inline

Indicates if the array is empty.

Definition at line 80 of file arccore/src/base/arccore/base/ArrayRange.h.

◆ end() [1/2]

template<typename T>
iterator Arcane::ArrayRange< T >::end ( )
inline

Returns an iterator to the first element after the end of the array.

Definition at line 69 of file arccore/src/base/arccore/base/ArrayRange.h.

◆ end() [2/2]

template<typename T>
const_iterator Arcane::ArrayRange< T >::end ( ) const
inline

Returns a constant iterator to the first element after the end of the array.

Definition at line 73 of file arccore/src/base/arccore/base/ArrayRange.h.

Member Data Documentation

◆ m_begin

template<typename T>
T Arcane::ArrayRange< T >::m_begin = nullptr
private

Definition at line 84 of file arccore/src/base/arccore/base/ArrayRange.h.

◆ m_end

template<typename T>
T Arcane::ArrayRange< T >::m_end = nullptr
private

Definition at line 85 of file arccore/src/base/arccore/base/ArrayRange.h.


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