ManaPlus
Public Types | Public Member Functions | Private Attributes | Friends
mse::msevector< _Ty, _A >::ipointer Class Reference

#include <msemsevector.h>

Inheritance diagram for mse::msevector< _Ty, _A >::ipointer:
mse::msevector< _Ty, _A >::random_access_iterator_base

Public Types

typedef mm_iterator_type::iterator_category iterator_category
 
typedef mm_iterator_type::value_type value_type
 
typedef mm_iterator_type::difference_type difference_type
 
typedef difference_type distance_type
 
typedef mm_iterator_type::pointer pointer
 
typedef mm_iterator_type::reference reference
 

Public Member Functions

 ipointer (_Myt &owner_ref)
 
 ipointer (const ipointer &src_cref)
 
 ~ipointer ()
 
mm_iterator_typeitem_pointer () const
 
mm_iterator_typeip () const
 
 operator cipointer () const
 
void reset ()
 
bool points_to_an_item () const
 
bool points_to_end_marker () const
 
bool points_to_beginning () const
 
bool has_next_item_or_end_marker () const
 
bool has_next () const
 
bool has_previous () const
 
void set_to_beginning ()
 
void set_to_end_marker ()
 
void set_to_next ()
 
void set_to_previous ()
 
ipointeroperator++ ()
 
ipointer operator++ (int)
 
ipointeroperator-- ()
 
ipointer operator-- (int)
 
void advance (difference_type n)
 
void regress (difference_type n)
 
ipointeroperator+= (difference_type n)
 
ipointeroperator-= (difference_type n)
 
ipointer operator+ (difference_type n) const
 
ipointer operator- (difference_type n) const
 
difference_type operator- (const ipointer &_Right_cref) const
 
reference operator* () const
 
reference item () const
 
reference previous_item () const
 
pointer operator-> () const
 
reference operator[] (difference_type _Off) const
 
ipointeroperator= (const ipointer &_Right_cref)
 
bool operator== (const ipointer &_Right_cref) const
 
bool operator!= (const ipointer &_Right_cref) const
 
bool operator< (const ipointer &_Right) const
 
bool operator<= (const ipointer &_Right) const
 
bool operator> (const ipointer &_Right) const
 
bool operator>= (const ipointer &_Right) const
 
void set_to_item_pointer (const ipointer &_Right_cref)
 
msev_size_t position () const
 

Private Attributes

_Mytm_owner_ptr = nullptr
 
std::shared_ptr< mm_iterator_handle_typem_handle_shptr
 

Friends

class msevector< _Ty, _A >
 

Detailed Description

template<class _Ty, class _A = std::allocator<_Ty>>
class mse::msevector< _Ty, _A >::ipointer

Definition at line 1516 of file msemsevector.h.

Member Typedef Documentation

◆ difference_type

template<class _Ty , class _A = std::allocator<_Ty>>
typedef mm_iterator_type::difference_type mse::msevector< _Ty, _A >::ipointer::difference_type

Definition at line 1520 of file msemsevector.h.

◆ distance_type

template<class _Ty , class _A = std::allocator<_Ty>>
typedef difference_type mse::msevector< _Ty, _A >::ipointer::distance_type

Definition at line 1521 of file msemsevector.h.

◆ iterator_category

template<class _Ty , class _A = std::allocator<_Ty>>
typedef mm_iterator_type::iterator_category mse::msevector< _Ty, _A >::ipointer::iterator_category

Definition at line 1518 of file msemsevector.h.

◆ pointer

template<class _Ty , class _A = std::allocator<_Ty>>
typedef mm_iterator_type::pointer mse::msevector< _Ty, _A >::ipointer::pointer

Definition at line 1522 of file msemsevector.h.

◆ reference

template<class _Ty , class _A = std::allocator<_Ty>>
typedef mm_iterator_type::reference mse::msevector< _Ty, _A >::ipointer::reference

Definition at line 1523 of file msemsevector.h.

◆ value_type

template<class _Ty , class _A = std::allocator<_Ty>>
typedef mm_iterator_type::value_type mse::msevector< _Ty, _A >::ipointer::value_type

Definition at line 1519 of file msemsevector.h.

Constructor & Destructor Documentation

◆ ipointer() [1/2]

template<class _Ty , class _A = std::allocator<_Ty>>
mse::msevector< _Ty, _A >::ipointer::ipointer ( _Myt owner_ref)
inline

Definition at line 1525 of file msemsevector.h.

1525  : m_owner_ptr(&owner_ref) {
1526  mm_iterator_handle_type handle = m_owner_ptr->allocate_new_item_pointer();
1527  m_handle_shptr = std::make_shared<mm_iterator_handle_type>(handle);
1528  }
std::shared_ptr< mm_iterator_handle_type > m_handle_shptr
mm_iterator_handle_type allocate_new_item_pointer() const

References mse::msevector< _Ty, _A >::allocate_new_item_pointer(), mse::msevector< _Ty, _A >::ipointer::m_handle_shptr, and mse::msevector< _Ty, _A >::ipointer::m_owner_ptr.

◆ ipointer() [2/2]

template<class _Ty , class _A = std::allocator<_Ty>>
mse::msevector< _Ty, _A >::ipointer::ipointer ( const ipointer src_cref)
inline

Definition at line 1529 of file msemsevector.h.

1529  : m_owner_ptr(src_cref.m_owner_ptr) {
1530  mm_iterator_handle_type handle = m_owner_ptr->allocate_new_item_pointer();
1531  m_handle_shptr = std::make_shared<mm_iterator_handle_type>(handle);
1532  item_pointer() = src_cref.item_pointer();
1533  }
mm_iterator_type & item_pointer() const

References mse::msevector< _Ty, _A >::allocate_new_item_pointer(), mse::msevector< _Ty, _A >::ipointer::item_pointer(), mse::msevector< _Ty, _A >::ipointer::m_handle_shptr, and mse::msevector< _Ty, _A >::ipointer::m_owner_ptr.

◆ ~ipointer()

template<class _Ty , class _A = std::allocator<_Ty>>
mse::msevector< _Ty, _A >::ipointer::~ipointer ( )
inline

Member Function Documentation

◆ advance()

template<class _Ty , class _A = std::allocator<_Ty>>
void mse::msevector< _Ty, _A >::ipointer::advance ( difference_type  n)
inline

◆ has_next()

template<class _Ty , class _A = std::allocator<_Ty>>
bool mse::msevector< _Ty, _A >::ipointer::has_next ( ) const
inline

◆ has_next_item_or_end_marker()

template<class _Ty , class _A = std::allocator<_Ty>>
bool mse::msevector< _Ty, _A >::ipointer::has_next_item_or_end_marker ( ) const
inline

◆ has_previous()

template<class _Ty , class _A = std::allocator<_Ty>>
bool mse::msevector< _Ty, _A >::ipointer::has_previous ( ) const
inline

◆ ip()

template<class _Ty , class _A = std::allocator<_Ty>>
mm_iterator_type& mse::msevector< _Ty, _A >::ipointer::ip ( ) const
inline

Definition at line 1538 of file msemsevector.h.

1538 { return item_pointer(); }

References mse::msevector< _Ty, _A >::ipointer::item_pointer().

◆ item()

template<class _Ty , class _A = std::allocator<_Ty>>
reference mse::msevector< _Ty, _A >::ipointer::item ( ) const
inline

Definition at line 1572 of file msemsevector.h.

1572 { return operator*(); }
reference operator*() const

References mse::msevector< _Ty, _A >::ipointer::operator*().

◆ item_pointer()

template<class _Ty , class _A = std::allocator<_Ty>>
mm_iterator_type& mse::msevector< _Ty, _A >::ipointer::item_pointer ( ) const
inline

Definition at line 1537 of file msemsevector.h.

mm_iterator_type & item_pointer(mm_iterator_handle_type handle)

References mse::msevector< _Ty, _A >::item_pointer(), mse::msevector< _Ty, _A >::ipointer::m_handle_shptr, and mse::msevector< _Ty, _A >::ipointer::m_owner_ptr.

Referenced by mse::msevector< _Ty, _A >::ipointer::advance(), mse::msevector< _Ty, _A >::ipointer::has_next(), mse::msevector< _Ty, _A >::ipointer::has_next_item_or_end_marker(), mse::msevector< _Ty, _A >::ipointer::has_previous(), mse::msevector< _Ty, _A >::ipointer::ip(), mse::msevector< _Ty, _A >::ipointer::ipointer(), mse::msevector< _Ty, _A >::ipointer::operator cipointer(), mse::msevector< _Ty, _A >::ipointer::operator*(), mse::msevector< _Ty, _A >::ipointer::operator++(), mse::msevector< _Ty, _A >::ipointer::operator+=(), mse::msevector< _Ty, _A >::ipointer::operator-(), mse::msevector< _Ty, _A >::ipointer::operator--(), mse::msevector< _Ty, _A >::ipointer::operator-=(), mse::msevector< _Ty, _A >::ipointer::operator->(), mse::msevector< _Ty, _A >::ipointer::operator<(), mse::msevector< _Ty, _A >::ipointer::operator<=(), mse::msevector< _Ty, _A >::ipointer::operator=(), mse::msevector< _Ty, _A >::ipointer::operator==(), mse::msevector< _Ty, _A >::ipointer::operator>(), mse::msevector< _Ty, _A >::ipointer::operator>=(), mse::msevector< _Ty, _A >::ipointer::operator[](), mse::msevector< _Ty, _A >::ipointer::points_to_an_item(), mse::msevector< _Ty, _A >::ipointer::points_to_beginning(), mse::msevector< _Ty, _A >::ipointer::points_to_end_marker(), mse::msevector< _Ty, _A >::ipointer::position(), mse::msevector< _Ty, _A >::ipointer::previous_item(), mse::msevector< _Ty, _A >::ipointer::regress(), mse::msevector< _Ty, _A >::ipointer::reset(), mse::msevector< _Ty, _A >::ipointer::set_to_beginning(), mse::msevector< _Ty, _A >::ipointer::set_to_end_marker(), mse::msevector< _Ty, _A >::ipointer::set_to_item_pointer(), mse::msevector< _Ty, _A >::ipointer::set_to_next(), and mse::msevector< _Ty, _A >::ipointer::set_to_previous().

◆ operator cipointer()

template<class _Ty , class _A = std::allocator<_Ty>>
mse::msevector< _Ty, _A >::ipointer::operator cipointer ( ) const
inline

◆ operator!=()

template<class _Ty , class _A = std::allocator<_Ty>>
bool mse::msevector< _Ty, _A >::ipointer::operator!= ( const ipointer _Right_cref) const
inline

Definition at line 1578 of file msemsevector.h.

1578 { return (!(_Right_cref == (*this))); }

◆ operator*()

template<class _Ty , class _A = std::allocator<_Ty>>
reference mse::msevector< _Ty, _A >::ipointer::operator* ( ) const
inline

Definition at line 1571 of file msemsevector.h.

1571 { return item_pointer().operator*(); }

References mse::msevector< _Ty, _A >::ipointer::item_pointer().

Referenced by mse::msevector< _Ty, _A >::ipointer::item().

◆ operator+()

template<class _Ty , class _A = std::allocator<_Ty>>
ipointer mse::msevector< _Ty, _A >::ipointer::operator+ ( difference_type  n) const
inline

Definition at line 1568 of file msemsevector.h.

1568 { auto retval = (*this); retval += n; return retval; }

◆ operator++() [1/2]

template<class _Ty , class _A = std::allocator<_Ty>>
ipointer& mse::msevector< _Ty, _A >::ipointer::operator++ ( )
inline

Definition at line 1560 of file msemsevector.h.

1560 { item_pointer().operator ++(); return (*this); }

References mse::msevector< _Ty, _A >::ipointer::item_pointer().

◆ operator++() [2/2]

template<class _Ty , class _A = std::allocator<_Ty>>
ipointer mse::msevector< _Ty, _A >::ipointer::operator++ ( int  )
inline

Definition at line 1561 of file msemsevector.h.

1561 { ipointer _Tmp = *this; ++*this; return (_Tmp); }
ipointer(_Myt &owner_ref)

◆ operator+=()

template<class _Ty , class _A = std::allocator<_Ty>>
ipointer& mse::msevector< _Ty, _A >::ipointer::operator+= ( difference_type  n)
inline

Definition at line 1566 of file msemsevector.h.

1566 { item_pointer().operator +=(n); return (*this); }

References mse::msevector< _Ty, _A >::ipointer::item_pointer().

◆ operator-() [1/2]

template<class _Ty , class _A = std::allocator<_Ty>>
difference_type mse::msevector< _Ty, _A >::ipointer::operator- ( const ipointer _Right_cref) const
inline

Definition at line 1570 of file msemsevector.h.

1570 { return item_pointer() - (_Right_cref.item_pointer()); }

References mse::msevector< _Ty, _A >::ipointer::item_pointer().

◆ operator-() [2/2]

template<class _Ty , class _A = std::allocator<_Ty>>
ipointer mse::msevector< _Ty, _A >::ipointer::operator- ( difference_type  n) const
inline

Definition at line 1569 of file msemsevector.h.

1569 { return ((*this) + (-n)); }

◆ operator--() [1/2]

template<class _Ty , class _A = std::allocator<_Ty>>
ipointer& mse::msevector< _Ty, _A >::ipointer::operator-- ( )
inline

Definition at line 1562 of file msemsevector.h.

1562 { item_pointer().operator --(); return (*this); }

References mse::msevector< _Ty, _A >::ipointer::item_pointer().

◆ operator--() [2/2]

template<class _Ty , class _A = std::allocator<_Ty>>
ipointer mse::msevector< _Ty, _A >::ipointer::operator-- ( int  )
inline

Definition at line 1563 of file msemsevector.h.

1563 { ipointer _Tmp = *this; --*this; return (_Tmp); }

◆ operator-=()

template<class _Ty , class _A = std::allocator<_Ty>>
ipointer& mse::msevector< _Ty, _A >::ipointer::operator-= ( difference_type  n)
inline

Definition at line 1567 of file msemsevector.h.

1567 { item_pointer().operator -=(n); return (*this); }

References mse::msevector< _Ty, _A >::ipointer::item_pointer().

◆ operator->()

template<class _Ty , class _A = std::allocator<_Ty>>
pointer mse::msevector< _Ty, _A >::ipointer::operator-> ( ) const
inline

Definition at line 1574 of file msemsevector.h.

1574 { return item_pointer().operator->(); }

References mse::msevector< _Ty, _A >::ipointer::item_pointer().

◆ operator<()

template<class _Ty , class _A = std::allocator<_Ty>>
bool mse::msevector< _Ty, _A >::ipointer::operator< ( const ipointer _Right) const
inline

Definition at line 1579 of file msemsevector.h.

1579 { return (item_pointer() < _Right.item_pointer()); }

References mse::msevector< _Ty, _A >::ipointer::item_pointer().

◆ operator<=()

template<class _Ty , class _A = std::allocator<_Ty>>
bool mse::msevector< _Ty, _A >::ipointer::operator<= ( const ipointer _Right) const
inline

Definition at line 1580 of file msemsevector.h.

1580 { return (item_pointer() <= _Right.item_pointer()); }

References mse::msevector< _Ty, _A >::ipointer::item_pointer().

◆ operator=()

template<class _Ty , class _A = std::allocator<_Ty>>
ipointer& mse::msevector< _Ty, _A >::ipointer::operator= ( const ipointer _Right_cref)
inline

Definition at line 1576 of file msemsevector.h.

1576 { item_pointer().operator=(_Right_cref.item_pointer()); return (*this); }

References mse::msevector< _Ty, _A >::ipointer::item_pointer().

◆ operator==()

template<class _Ty , class _A = std::allocator<_Ty>>
bool mse::msevector< _Ty, _A >::ipointer::operator== ( const ipointer _Right_cref) const
inline

Definition at line 1577 of file msemsevector.h.

1577 { return item_pointer().operator==(_Right_cref.item_pointer()); }

References mse::msevector< _Ty, _A >::ipointer::item_pointer().

◆ operator>()

template<class _Ty , class _A = std::allocator<_Ty>>
bool mse::msevector< _Ty, _A >::ipointer::operator> ( const ipointer _Right) const
inline

Definition at line 1581 of file msemsevector.h.

1581 { return (item_pointer() > _Right.item_pointer()); }

References mse::msevector< _Ty, _A >::ipointer::item_pointer().

◆ operator>=()

template<class _Ty , class _A = std::allocator<_Ty>>
bool mse::msevector< _Ty, _A >::ipointer::operator>= ( const ipointer _Right) const
inline

Definition at line 1582 of file msemsevector.h.

1582 { return (item_pointer() >= _Right.item_pointer()); }

References mse::msevector< _Ty, _A >::ipointer::item_pointer().

◆ operator[]()

template<class _Ty , class _A = std::allocator<_Ty>>
reference mse::msevector< _Ty, _A >::ipointer::operator[] ( difference_type  _Off) const
inline

Definition at line 1575 of file msemsevector.h.

1575 { return item_pointer()[_Off]; }

References mse::msevector< _Ty, _A >::ipointer::item_pointer().

◆ points_to_an_item()

template<class _Ty , class _A = std::allocator<_Ty>>
bool mse::msevector< _Ty, _A >::ipointer::points_to_an_item ( ) const
inline

◆ points_to_beginning()

template<class _Ty , class _A = std::allocator<_Ty>>
bool mse::msevector< _Ty, _A >::ipointer::points_to_beginning ( ) const
inline

◆ points_to_end_marker()

template<class _Ty , class _A = std::allocator<_Ty>>
bool mse::msevector< _Ty, _A >::ipointer::points_to_end_marker ( ) const
inline

◆ position()

template<class _Ty , class _A = std::allocator<_Ty>>
msev_size_t mse::msevector< _Ty, _A >::ipointer::position ( ) const
inline

◆ previous_item()

template<class _Ty , class _A = std::allocator<_Ty>>
reference mse::msevector< _Ty, _A >::ipointer::previous_item ( ) const
inline

◆ regress()

template<class _Ty , class _A = std::allocator<_Ty>>
void mse::msevector< _Ty, _A >::ipointer::regress ( difference_type  n)
inline

◆ reset()

template<class _Ty , class _A = std::allocator<_Ty>>
void mse::msevector< _Ty, _A >::ipointer::reset ( )
inline

◆ set_to_beginning()

template<class _Ty , class _A = std::allocator<_Ty>>
void mse::msevector< _Ty, _A >::ipointer::set_to_beginning ( )
inline

◆ set_to_end_marker()

template<class _Ty , class _A = std::allocator<_Ty>>
void mse::msevector< _Ty, _A >::ipointer::set_to_end_marker ( )
inline

◆ set_to_item_pointer()

template<class _Ty , class _A = std::allocator<_Ty>>
void mse::msevector< _Ty, _A >::ipointer::set_to_item_pointer ( const ipointer _Right_cref)
inline

Definition at line 1583 of file msemsevector.h.

1583 { item_pointer().set_to_item_pointer(_Right_cref.item_pointer()); }
void set_to_item_pointer(const mm_iterator_type &_Right_cref)

References mse::msevector< _Ty, _A >::ipointer::item_pointer(), and mse::msevector< _Ty, _A >::mm_iterator_type::set_to_item_pointer().

◆ set_to_next()

template<class _Ty , class _A = std::allocator<_Ty>>
void mse::msevector< _Ty, _A >::ipointer::set_to_next ( )
inline

◆ set_to_previous()

template<class _Ty , class _A = std::allocator<_Ty>>
void mse::msevector< _Ty, _A >::ipointer::set_to_previous ( )
inline

Friends And Related Function Documentation

◆ msevector< _Ty, _A >

template<class _Ty , class _A = std::allocator<_Ty>>
friend class msevector< _Ty, _A >
friend

Definition at line 1587 of file msemsevector.h.

Field Documentation

◆ m_handle_shptr

template<class _Ty , class _A = std::allocator<_Ty>>
std::shared_ptr<mm_iterator_handle_type> mse::msevector< _Ty, _A >::ipointer::m_handle_shptr
private

◆ m_owner_ptr

template<class _Ty , class _A = std::allocator<_Ty>>
_Myt* mse::msevector< _Ty, _A >::ipointer::m_owner_ptr = nullptr
private

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