Arcane  4.1.12.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

typedef std::iterator_traits< T > _TraitsType
typedef _TraitsType::value_type value_type
typedef _TraitsType::difference_type difference_type
typedef _TraitsType::reference reference
typedef _TraitsType::pointer pointer
typedef const value_type * const_pointer
typedef ArrayIterator< pointer > iterator
 Type of the iterator for an element of the array.
typedef ArrayIterator< const_pointer > const_iterator
 Type of the constant iterator for an element of the array.

Public Member Functions

 ArrayRange () ARCCORE_NOEXCEPT
 Constructs an empty range.
 ArrayRange (pointer abegin, pointer aend) ARCCORE_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.

Private Attributes

m_begin
m_end

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 35 of file arccore/src/base/arccore/base/ArrayRange.h.

Member Typedef Documentation

◆ _TraitsType

template<typename T>
typedef std::iterator_traits<T> Arcane::ArrayRange< T >::_TraitsType

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

◆ const_iterator

template<typename T>
typedef ArrayIterator<const_pointer> Arcane::ArrayRange< T >::const_iterator

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>
typedef const value_type* Arcane::ArrayRange< T >::const_pointer

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

◆ difference_type

template<typename T>
typedef _TraitsType::difference_type Arcane::ArrayRange< T >::difference_type

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

◆ iterator

template<typename T>
typedef ArrayIterator<pointer> Arcane::ArrayRange< T >::iterator

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>
typedef _TraitsType::pointer Arcane::ArrayRange< T >::pointer

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

◆ reference

template<typename T>
typedef _TraitsType::reference Arcane::ArrayRange< T >::reference

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

◆ value_type

template<typename T>
typedef _TraitsType::value_type Arcane::ArrayRange< T >::value_type

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

Constructor & Destructor Documentation

◆ ArrayRange() [1/2]

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

Constructs an empty range.

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

◆ ArrayRange() [2/2]

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

Constructs a range going from abegin to aend.

Definition at line 60 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
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
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: