xtd 0.2.0
Loading...
Searching...
No Matches
xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t > Class Template Reference
Inheritance diagram for xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >:
xtd::icomparable< type_t > xtd::iequatable< type_t > xtd::interface xtd::extensions::comparison_operators< type_t, icomparable< type_t > > xtd::interface xtd::extensions::equality_operators< type_t, iequatable< type_t > >

Definition

template<class value_t, class iterator_tag_t = std::bidirectional_iterator_tag>
class xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >

Represents a wrap pointer iterator.

Definition
template<class value_t, class iterator_tag_t = std::bidirectional_iterator_tag>
class wrap_pointer_iterator : public xtd::icomparable<wrap_pointer_iterator<value_t, iterator_tag_t>>, public xtd::iequatable<wrap_pointer_iterator<value_t, iterator_tag_t>>;
Represents a wrap pointer iterator.
Definition wrap_pointer_iterator.hpp:35
Defines a generalized comparison method that a value type or class implements to create a type-specif...
Definition icomparable.hpp:21
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:22
Header
#include <xtd/collections/genric/helpers/wrap_pointer_iterator>
Namespace
xtd::collections::generic::helpers
Library
xtd.core

Public Aliases

using value_type = value_t
 Represents the value type.
 
using iterator_category = iterator_tag_t
 Represents the iterator category type.
 
using iterator_concept = iterator_tag_t
 Represents the iterator concept type.
 
using difference_type = xtd::ptrdiff
 Represents the value type.
 
using pointer = value_type *
 Represents the pointer of the value type.
 
using const_pointer = const value_type *
 Represents the const pointer of the value type.
 
using reference = value_type &
 Represents the reference of the value type.
 
using const_reference = const value_type &
 Represents the const reference of the value type.
 

Public Constructors

 wrap_pointer_iterator ()=default
 Initializes a new instance of the xtd::collections::generic::helpers::wrap_pointer_iterator class.
 
 wrap_pointer_iterator (value_t pointer) noexcept
 Initializes a new instance of the xtd::collections::generic::helpers::wrap_pointer_iterator class with specified pointer value.
 

Public Properties

const value_t & data () const noexcept
 Gets iterator data.
 
value_t & data () noexcept
 Gets iterator data.
 

Public methods

int32 compare_to (const wrap_pointer_iterator &rhs) const noexcept override
 
bool equals (const wrap_pointer_iterator &rhs) const noexcept override
 

Public Operators

const std::remove_pointer_t< value_t > & operator* () const noexcept
 Returns reference to the current element, or a proxy holding it.
 
std::remove_pointer_t< value_t > & operator* () noexcept
 Returns reference to the current element, or a proxy holding it.
 
const value_t & operator-> () const noexcept
 Returns pointer to the current element, or a proxy holding it.
 
value_t & operator-> () noexcept
 Returns pointer to the current element, or a proxy holding it.
 
wrap_pointer_iteratoroperator++ () const noexcept
 Pre increments the underlying iterator.
 
wrap_pointer_iterator operator++ (int) const noexcept
 Post increments the underlying iterator.
 
wrap_pointer_iteratoroperator-- () const noexcept
 Pre decrements the underlying iterator.
 
wrap_pointer_iterator operator-- (int) const noexcept
 Post decrements the underlying iterator.
 
wrap_pointer_iterator operator+ (xtd::size value) const noexcept
 Add operator with specified value.
 
wrap_pointer_iteratoroperator+= (xtd::size value) noexcept
 Add equal operator with specified value.
 
xtd::ptrdiff operator- (wrap_pointer_iterator value) const noexcept
 Subtract The specified iterator from the current iterator.
 

Additional Inherited Members

- Public Member Functions inherited from xtd::icomparable< type_t >
virtual int32 compare_to (const type_t &obj) const noexcept=0
 Compares the current instance with another object of the same type.
 
- Public Member Functions inherited from xtd::iequatable< type_t >
virtual bool equals (const type_t &) const noexcept=0
 Indicates whether the current object is equal to another object of the same type.
 

Member Typedef Documentation

◆ value_type

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
using xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::value_type = value_t

Represents the value type.

◆ iterator_category

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
using xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::iterator_category = iterator_tag_t

Represents the iterator category type.

◆ iterator_concept

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
using xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::iterator_concept = iterator_tag_t

Represents the iterator concept type.

◆ difference_type

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
using xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::difference_type = xtd::ptrdiff

Represents the value type.

◆ pointer

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
using xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::pointer = value_type*

Represents the pointer of the value type.

◆ const_pointer

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
using xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::const_pointer = const value_type*

Represents the const pointer of the value type.

◆ reference

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
using xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::reference = value_type&

Represents the reference of the value type.

◆ const_reference

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
using xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::const_reference = const value_type&

Represents the const reference of the value type.

Constructor & Destructor Documentation

◆ wrap_pointer_iterator() [1/2]

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::wrap_pointer_iterator ( )
default

Initializes a new instance of the xtd::collections::generic::helpers::wrap_pointer_iterator class.

◆ wrap_pointer_iterator() [2/2]

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::wrap_pointer_iterator ( value_t  pointer)
inlineexplicitnoexcept

Initializes a new instance of the xtd::collections::generic::helpers::wrap_pointer_iterator class with specified pointer value.

Parameters
pointerThe pointer value.

Member Function Documentation

◆ data() [1/2]

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
const value_t & xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::data ( ) const
inlinenoexcept

Gets iterator data.

Returns
The iterator data.

◆ data() [2/2]

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
value_t & xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::data ( )
inlinenoexcept

Gets iterator data.

Returns
The iterator data.

◆ operator*() [1/2]

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
const std::remove_pointer_t< value_t > & xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::operator* ( ) const
inlinenoexcept

Returns reference to the current element, or a proxy holding it.

Returns
The reference to the current element.

◆ operator*() [2/2]

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
std::remove_pointer_t< value_t > & xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::operator* ( )
inlinenoexcept

Returns reference to the current element, or a proxy holding it.

Returns
The reference to the current element.

◆ operator->() [1/2]

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
const value_t & xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::operator-> ( ) const
inlinenoexcept

Returns pointer to the current element, or a proxy holding it.

Returns
The pointer to the current element.

◆ operator->() [2/2]

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
value_t & xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::operator-> ( )
inlinenoexcept

Returns pointer to the current element, or a proxy holding it.

Returns
The pointer to the current element.

◆ operator++() [1/2]

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
wrap_pointer_iterator & xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::operator++ ( ) const
inlinenoexcept

Pre increments the underlying iterator.

Returns
The underlying iterator.

◆ operator++() [2/2]

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
wrap_pointer_iterator xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::operator++ ( int  ) const
inlinenoexcept

Post increments the underlying iterator.

Returns
The underlying iterator.

◆ operator--() [1/2]

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
wrap_pointer_iterator & xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::operator-- ( ) const
inlinenoexcept

Pre decrements the underlying iterator.

Returns
The underlying iterator.

◆ operator--() [2/2]

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
wrap_pointer_iterator xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::operator-- ( int  ) const
inlinenoexcept

Post decrements the underlying iterator.

Returns
The underlying iterator.

◆ operator+()

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
wrap_pointer_iterator xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::operator+ ( xtd::size  value) const
inlinenoexcept

Add operator with specified value.

Parameters
valueThe number to add to the underlying iterator.
Returns
The underlying iterator.

◆ operator+=()

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
wrap_pointer_iterator & xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::operator+= ( xtd::size  value)
inlinenoexcept

Add equal operator with specified value.

Parameters
valueThe number to add to the underlying iterator.
Returns
The underlying iterator.

◆ operator-()

template<class value_t , class iterator_tag_t = std::bidirectional_iterator_tag>
xtd::ptrdiff xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >::operator- ( wrap_pointer_iterator< value_t, iterator_tag_t >  value) const
inlinenoexcept

Subtract The specified iterator from the current iterator.

Parameters
valueThe iterator to subtract from the current iterator.
Returns
The difference between current iterator and the specified iterator.

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