efl::eina::_const_range_template< T, Traits > Struct Template Reference

Public Types | Public Member Functions | Protected Attributes
efl::eina::_const_range_template< T, Traits > Struct Template Reference
Eina C++Eina C++ » | Data Types » Content Access » Range

Range implementation for immutable collections. More...

## Public Types
typedef container_value_type< T >::type | value_type
| The type of each element. More...
typedef Traits::template const_iterator< value_type >::type | const_iterator
| Type for constant iterator to the range. More...
typedef Traits::template iterator< value_type >::type | iterator
| Type for iterator to the range. More...
typedef value_type & | reference
| Type for a reference to an element. More...
typedef value_type const & | const_reference
| Type for a constant reference to an element. More...
typedef T * | pointer
| Type for a pointer to an element. More...
typedef T const * | const_pointer
| Type for a constant pointer to an element. More...
typedef std::reverse_iterator< iterator > | reverse_iterator
| Type for reverse iterator to the range. More...
typedef std::reverse_iterator< const_iterator > | const_reverse_iterator
| Type for constant reverse iterator to the range. More...
typedef std::size_t | size_type
| Type for size information. More...
typedef std::ptrdiff_t | difference_type
| Type to represent the distance between two iterators. More...
typedef Traits::template const_native_handle< T >::type | native_handle_type
| Type for the native handle of the container. More...
typedef _const_range_template< T, Traits > | _self_type
| Type of the range itself. More...

## Public Member Functions
| _const_range_template ()
| Creates a singular range object.
| _const_range_template (native_handle_type handle)
| Creates a range object wrapping the given native container handle.
native_handle_type | release_native_handle ()
| Release the handle of the native Eina container. More...
native_handle_type | native_handle () const
| Get a constant handle for the native Eina container. More...
value_type const & | back () const
| Get a constant reference to the last element. More...
value_type const & | front () const
| Get a constant reference to the first element. More...
const_iterator | begin () const
| Get a constant iterator pointing to the first element of the range. More...
const_iterator | end () const
| Get a constant iterator to the position following the last element of the range. More...
const_reverse_iterator | crbegin () const
| Get a constant reverse iterator pointing to the reverse begin of the range. More...
const_reverse_iterator | crend () const
| Get a constant reverse iterator pointing to the reverse end of the range. More...
const_iterator | cbegin () const
| Get a constant iterator pointing to the first element of the range. More...
const_iterator | cend () const
| Get a constant iterator to the position following the last element of the range. More...
const_reverse_iterator | rbegin ()
| Get a constant reverse iterator pointing to the reverse begin of the range. More...
const_reverse_iterator | rend ()
| Get a constant reverse iterator pointing to the reverse end of the range. More...
bool | empty () const
| Check if the range does not contain any elements. More...
size_type | size () const
| Get the number of elements in the range. More...
void | swap (_self_type &other)
| Swap content with another range of the same type. More...

## Protected Attributes
native_handle_type | _handle

## Detailed Description

### template<typename T, typename Traits>
struct efl::eina::_const_range_template< T, Traits >

Range implementation for immutable collections.

## Member Typedef Documentation

## ◆ value_type

template<typename T, typename Traits>

typedef container_value_type<T>::type efl::eina::_const_range_template< T, Traits >::value_type

The type of each element.

## ◆ const_iterator

template<typename T, typename Traits>

typedef Traits::template const_iterator<value_type>::type efl::eina::_const_range_template< T, Traits >::const_iterator

Type for constant iterator to the range.

## ◆ iterator

template<typename T, typename Traits>

typedef Traits::template iterator<value_type>::type efl::eina::_const_range_template< T, Traits >::iterator

Type for iterator to the range.

## ◆ reference

template<typename T, typename Traits>

typedef value_type& efl::eina::_const_range_template< T, Traits >::reference

Type for a reference to an element.

## ◆ const_reference

template<typename T, typename Traits>

typedef value_type const& efl::eina::_const_range_template< T, Traits >::const_reference

Type for a constant reference to an element.

## ◆ pointer

template<typename T, typename Traits>

typedef T* efl::eina::_const_range_template< T, Traits >::pointer

Type for a pointer to an element.

## ◆ const_pointer

template<typename T, typename Traits>

typedef T const* efl::eina::_const_range_template< T, Traits >::const_pointer

Type for a constant pointer to an element.

## ◆ reverse_iterator

template<typename T, typename Traits>

typedef std::reverse_iterator<iterator> efl::eina::_const_range_template< T, Traits >::reverse_iterator

Type for reverse iterator to the range.

## ◆ const_reverse_iterator

template<typename T, typename Traits>

typedef std::reverse_iterator<const_iterator> efl::eina::_const_range_template< T, Traits >::const_reverse_iterator

Type for constant reverse iterator to the range.

## ◆ size_type

template<typename T, typename Traits>

typedef std::size_t efl::eina::_const_range_template< T, Traits >::size_type

Type for size information.

## ◆ difference_type

template<typename T, typename Traits>

typedef std::ptrdiff_t efl::eina::_const_range_template< T, Traits >::difference_type

Type to represent the distance between two iterators.

## ◆ native_handle_type

template<typename T, typename Traits>

typedef Traits::template const_native_handle<T>::type efl::eina::_const_range_template< T, Traits >::native_handle_type

Type for the native handle of the container.

## ◆ _self_type

template<typename T, typename Traits>

typedef _const_range_template<T, Traits> efl::eina::_const_range_template< T, Traits >::_self_type

Type of the range itself.

## Member Function Documentation

## ◆ release_native_handle()

template<typename T, typename Traits>

native_handle_type efl::eina::_const_range_template< T, Traits >::release_native_handle | ( |  | ) |
| inline

Release the handle of the native Eina container.

Returns
  Handle for the native Eina container.

## ◆ native_handle()

template<typename T, typename Traits>

native_handle_type efl::eina::_const_range_template< T, Traits >::native_handle | ( |  | ) | const
| inline

Get a constant handle for the native Eina container.

Returns
  Constant handle for the native Eina container.

Referenced by efl::eina::_mutable_range_template< T, Traits >::back(), efl::eina::_mutable_range_template< T, Traits >::begin(), efl::eina::_mutable_range_template< T, Traits >::end(), efl::eina::_mutable_range_template< T, Traits >::front(), efl::eina::_mutable_range_template< T, Traits >::rbegin(), and efl::eina::_mutable_range_template< T, Traits >::rend().

## ◆ back()

template<typename T, typename Traits>

value_type const& efl::eina::_const_range_template< T, Traits >::back | ( |  | ) | const
| inline

Get a constant reference to the last element.

Returns
  Constant reference to the last element of the range.

## ◆ front()

template<typename T, typename Traits>

value_type const& efl::eina::_const_range_template< T, Traits >::front | ( |  | ) | const
| inline

Get a constant reference to the first element.

Returns
  Constant reference to the first element of the range.

## ◆ begin()

template<typename T, typename Traits>

const_iterator efl::eina::_const_range_template< T, Traits >::begin | ( |  | ) | const
| inline

Get a constant iterator pointing to the first element of the range.

Returns
  Constant iterator to the initial position of the range.

This member function returns a constant iterator pointing to the first element of the range. If the range contains no elements the returned iterator is the same as the one returned by end() const.

References efl::eina::_const_range_template< T, Traits >::cbegin().

## ◆ end()

template<typename T, typename Traits>

const_iterator efl::eina::_const_range_template< T, Traits >::end | ( |  | ) | const
| inline

Get a constant iterator to the position following the last element of the range.

Returns
  Constant iterator to the final position of the range.

This member function returns a constant iterator to the position following the last element in the range. If the range contains no elements the returned iterator is the same as the one returned by begin() const.

Note
  Note that attempting to access this position causes undefined behavior.

References efl::eina::_const_range_template< T, Traits >::cend().

## ◆ crbegin()

template<typename T, typename Traits>

const_reverse_iterator efl::eina::_const_range_template< T, Traits >::crbegin | ( |  | ) | const
| inline

Get a constant reverse iterator pointing to the reverse begin of the range.

Returns
  Constant reverse iterator pointing to the reverse begin of the range.

This member function works like rbegin() const but is granted to return a constant reverse iterator even for a range to a mutable collection.

Referenced by efl::eina::_const_range_template< T, Traits >::rbegin().

## ◆ crend()

template<typename T, typename Traits>

const_reverse_iterator efl::eina::_const_range_template< T, Traits >::crend | ( |  | ) | const
| inline

Get a constant reverse iterator pointing to the reverse end of the range.

Returns
  Constant reverse iterator pointing to the reverse end of the range.

This member function works like rend() const but is granted to return a constant reverse iterator even for range to a mutable collection.

Referenced by efl::eina::_const_range_template< T, Traits >::rend().

## ◆ cbegin()

template<typename T, typename Traits>

const_iterator efl::eina::_const_range_template< T, Traits >::cbegin | ( |  | ) | const
| inline

Get a constant iterator pointing to the first element of the range.

Returns
  Constant iterator to the initial position of the range.

This member function works like begin() const but is granted to return a constant iterator even for a range to a mutable collection.

Referenced by efl::eina::_const_range_template< T, Traits >::begin().

## ◆ cend()

template<typename T, typename Traits>

const_iterator efl::eina::_const_range_template< T, Traits >::cend | ( |  | ) | const
| inline

Get a constant iterator to the position following the last element of the range.

Returns
  Constant iterator to the final position of the range.

This member function works like end() const but is granted to return a constant iterator even for a range to a mutable collection.

Referenced by efl::eina::_const_range_template< T, Traits >::end().

## ◆ rbegin()

template<typename T, typename Traits>

const_reverse_iterator efl::eina::_const_range_template< T, Traits >::rbegin | ( |  | ) |
| inline

Get a constant reverse iterator pointing to the reverse begin of the range.

Returns
  Constant reverse iterator pointing to the reverse begin of the range.

This member function returns a constant reverse iterator pointing to the last element of the range. If the range is empty the returned reverse iterator is the same as the one returned by rend().

References efl::eina::_const_range_template< T, Traits >::crbegin().

## ◆ rend()

template<typename T, typename Traits>

const_reverse_iterator efl::eina::_const_range_template< T, Traits >::rend | ( |  | ) |
| inline

Get a constant reverse iterator pointing to the reverse end of the range.

Returns
  Constant reverse iterator pointing to the reverse end of the range.

This member function returns a constant reverse iterator pointing to the position before the first element of the range. If the range is empty the returned iterator is the same as the one returned by rbegin().

Note
  Note that attempting to access this position causes undefined behavior.

References efl::eina::_const_range_template< T, Traits >::crend().

## ◆ empty()

template<typename T, typename Traits>

bool efl::eina::_const_range_template< T, Traits >::empty | ( |  | ) | const
| inline

Check if the range does not contain any elements.

Returns
  `true` if there is no elements in the range, `false` otherwise.

This member function returns `true` if the range does not contain any elements, otherwise it returns `false`.

## ◆ size()

template<typename T, typename Traits>

size_type efl::eina::_const_range_template< T, Traits >::size | ( |  | ) | const
| inline

Get the number of elements in the range.

Returns
  Number of elements in the range.

This member function returns the current number of elements in the range.

## ◆ swap()

template<typename T, typename Traits>

void efl::eina::_const_range_template< T, Traits >::swap | ( | _self_type & | other | ) |
| inline

Swap content with another range of the same type.

Parameters

  other | Another range of the same type.

References efl::eina::swap().

Referenced by efl::eina::swap().