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

#include <msemsevector.h>

Inheritance diagram for mse::msevector< _Ty, _A >::cipointer:
mse::msevector< _Ty, _A >::random_access_const_iterator_base

Public Types

typedef mm_const_iterator_type::iterator_category iterator_category
 
typedef mm_const_iterator_type::value_type value_type
 
typedef mm_const_iterator_type::difference_type difference_type
 
typedef difference_type distance_type
 
typedef mm_const_iterator_type::pointer pointer
 
typedef mm_const_iterator_type::const_pointer const_pointer
 
typedef mm_const_iterator_type::reference reference
 
typedef mm_const_iterator_type::const_reference const_reference
 

Public Member Functions

 cipointer (const _Myt &owner_cref)
 
 cipointer (const cipointer &src_cref)
 
 ~cipointer ()
 
mm_const_iterator_typeconst_item_pointer () const
 
mm_const_iterator_typecip () 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 ()
 
cipointeroperator++ ()
 
cipointer operator++ (int)
 
cipointeroperator-- ()
 
cipointer operator-- (int)
 
void advance (difference_type n)
 
void regress (difference_type n)
 
cipointeroperator+= (difference_type n)
 
cipointeroperator-= (difference_type n)
 
cipointer operator+ (difference_type n) const
 
cipointer operator- (difference_type n) const
 
difference_type operator- (const cipointer &_Right_cref) const
 
const_reference operator* () const
 
const_reference item () const
 
const_reference previous_item () const
 
const_pointer operator-> () const
 
const_reference operator[] (difference_type _Off) const
 
cipointeroperator= (const cipointer &_Right_cref)
 
bool operator== (const cipointer &_Right_cref) const
 
bool operator!= (const cipointer &_Right_cref) const
 
bool operator< (const cipointer &_Right) const
 
bool operator<= (const cipointer &_Right) const
 
bool operator> (const cipointer &_Right) const
 
bool operator>= (const cipointer &_Right) const
 
void set_to_const_item_pointer (const cipointer &_Right_cref)
 
msev_size_t position () const
 

Private Attributes

const _Mytm_owner_cptr = nullptr
 
std::shared_ptr< mm_const_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 >::cipointer

Definition at line 1446 of file msemsevector.h.

Member Typedef Documentation

◆ const_pointer

template<class _Ty , class _A = std::allocator<_Ty>>
typedef mm_const_iterator_type::const_pointer mse::msevector< _Ty, _A >::cipointer::const_pointer

Definition at line 1453 of file msemsevector.h.

◆ const_reference

template<class _Ty , class _A = std::allocator<_Ty>>
typedef mm_const_iterator_type::const_reference mse::msevector< _Ty, _A >::cipointer::const_reference

Definition at line 1455 of file msemsevector.h.

◆ difference_type

template<class _Ty , class _A = std::allocator<_Ty>>
typedef mm_const_iterator_type::difference_type mse::msevector< _Ty, _A >::cipointer::difference_type

Definition at line 1450 of file msemsevector.h.

◆ distance_type

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

Definition at line 1451 of file msemsevector.h.

◆ iterator_category

template<class _Ty , class _A = std::allocator<_Ty>>
typedef mm_const_iterator_type::iterator_category mse::msevector< _Ty, _A >::cipointer::iterator_category

Definition at line 1448 of file msemsevector.h.

◆ pointer

template<class _Ty , class _A = std::allocator<_Ty>>
typedef mm_const_iterator_type::pointer mse::msevector< _Ty, _A >::cipointer::pointer

Definition at line 1452 of file msemsevector.h.

◆ reference

template<class _Ty , class _A = std::allocator<_Ty>>
typedef mm_const_iterator_type::reference mse::msevector< _Ty, _A >::cipointer::reference

Definition at line 1454 of file msemsevector.h.

◆ value_type

template<class _Ty , class _A = std::allocator<_Ty>>
typedef mm_const_iterator_type::value_type mse::msevector< _Ty, _A >::cipointer::value_type

Definition at line 1449 of file msemsevector.h.

Constructor & Destructor Documentation

◆ cipointer() [1/2]

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

Definition at line 1457 of file msemsevector.h.

1457  : m_owner_cptr(&owner_cref) {
1458  mm_const_iterator_handle_type handle = m_owner_cptr->allocate_new_const_item_pointer();
1459  m_handle_shptr = std::make_shared<mm_const_iterator_handle_type>(handle);
1460  }
std::shared_ptr< mm_const_iterator_handle_type > m_handle_shptr
mm_const_iterator_handle_type allocate_new_const_item_pointer() const

References mse::msevector< _Ty, _A >::allocate_new_const_item_pointer(), mse::msevector< _Ty, _A >::cipointer::m_handle_shptr, and mse::msevector< _Ty, _A >::cipointer::m_owner_cptr.

◆ cipointer() [2/2]

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

Definition at line 1461 of file msemsevector.h.

1461  : m_owner_cptr(src_cref.m_owner_cptr) {
1462  mm_const_iterator_handle_type handle = m_owner_cptr->allocate_new_const_item_pointer();
1463  m_handle_shptr = std::make_shared<mm_const_iterator_handle_type>(handle);
1464  const_item_pointer() = src_cref.const_item_pointer();
1465  }
mm_const_iterator_type & const_item_pointer() const

References mse::msevector< _Ty, _A >::allocate_new_const_item_pointer(), mse::msevector< _Ty, _A >::cipointer::const_item_pointer(), mse::msevector< _Ty, _A >::cipointer::m_handle_shptr, and mse::msevector< _Ty, _A >::cipointer::m_owner_cptr.

◆ ~cipointer()

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

Member Function Documentation

◆ advance()

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

◆ cip()

template<class _Ty , class _A = std::allocator<_Ty>>
mm_const_iterator_type& mse::msevector< _Ty, _A >::cipointer::cip ( ) const
inline

Definition at line 1470 of file msemsevector.h.

1470 { return const_item_pointer(); }

References mse::msevector< _Ty, _A >::cipointer::const_item_pointer().

◆ const_item_pointer()

template<class _Ty , class _A = std::allocator<_Ty>>
mm_const_iterator_type& mse::msevector< _Ty, _A >::cipointer::const_item_pointer ( ) const
inline

Definition at line 1469 of file msemsevector.h.

mm_const_iterator_type & const_item_pointer(mm_const_iterator_handle_type handle) const

References mse::msevector< _Ty, _A >::const_item_pointer(), mse::msevector< _Ty, _A >::cipointer::m_handle_shptr, and mse::msevector< _Ty, _A >::cipointer::m_owner_cptr.

Referenced by mse::msevector< _Ty, _A >::cipointer::advance(), mse::msevector< _Ty, _A >::assign(), mse::msevector< _Ty, _A >::assign_inclusive(), mse::msevector< _Ty, _A >::cipointer::cip(), mse::msevector< _Ty, _A >::cipointer::cipointer(), mse::msevector< _Ty, _A >::emplace(), mse::msevector< _Ty, _A >::erase(), mse::msevector< _Ty, _A >::erase_previous_item(), mse::msevector< _Ty, _A >::cipointer::has_next(), mse::msevector< _Ty, _A >::cipointer::has_next_item_or_end_marker(), mse::msevector< _Ty, _A >::cipointer::has_previous(), mse::msevector< _Ty, _A >::insert_before(), mse::msevector< _Ty, _A >::ipointer::operator cipointer(), mse::msevector< _Ty, _A >::cipointer::operator*(), mse::msevector< _Ty, _A >::cipointer::operator++(), mse::msevector< _Ty, _A >::cipointer::operator+=(), mse::msevector< _Ty, _A >::cipointer::operator-(), mse::msevector< _Ty, _A >::cipointer::operator--(), mse::msevector< _Ty, _A >::cipointer::operator-=(), mse::msevector< _Ty, _A >::cipointer::operator->(), mse::msevector< _Ty, _A >::cipointer::operator<(), mse::msevector< _Ty, _A >::cipointer::operator<=(), mse::msevector< _Ty, _A >::cipointer::operator=(), mse::msevector< _Ty, _A >::cipointer::operator==(), mse::msevector< _Ty, _A >::cipointer::operator>(), mse::msevector< _Ty, _A >::cipointer::operator>=(), mse::msevector< _Ty, _A >::cipointer::operator[](), mse::msevector< _Ty, _A >::cipointer::points_to_an_item(), mse::msevector< _Ty, _A >::cipointer::points_to_beginning(), mse::msevector< _Ty, _A >::cipointer::points_to_end_marker(), mse::msevector< _Ty, _A >::cipointer::position(), mse::msevector< _Ty, _A >::cipointer::previous_item(), mse::msevector< _Ty, _A >::cipointer::regress(), mse::msevector< _Ty, _A >::cipointer::reset(), mse::msevector< _Ty, _A >::cipointer::set_to_beginning(), mse::msevector< _Ty, _A >::cipointer::set_to_const_item_pointer(), mse::msevector< _Ty, _A >::cipointer::set_to_end_marker(), mse::msevector< _Ty, _A >::cipointer::set_to_next(), and mse::msevector< _Ty, _A >::cipointer::set_to_previous().

◆ has_next()

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

◆ has_next_item_or_end_marker()

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

◆ has_previous()

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

◆ item()

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

Definition at line 1498 of file msemsevector.h.

1498 { return operator*(); }
const_reference operator*() const

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

◆ operator!=()

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

Definition at line 1504 of file msemsevector.h.

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

◆ operator*()

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

Definition at line 1497 of file msemsevector.h.

1497 { return const_item_pointer().operator*(); }

References mse::msevector< _Ty, _A >::cipointer::const_item_pointer().

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

◆ operator+()

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

Definition at line 1494 of file msemsevector.h.

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

◆ operator++() [1/2]

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

Definition at line 1486 of file msemsevector.h.

1486 { const_item_pointer().operator ++(); return (*this); }

References mse::msevector< _Ty, _A >::cipointer::const_item_pointer().

◆ operator++() [2/2]

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

Definition at line 1487 of file msemsevector.h.

1487 { cipointer _Tmp = *this; ++*this; return (_Tmp); }
cipointer(const _Myt &owner_cref)

◆ operator+=()

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

Definition at line 1492 of file msemsevector.h.

1492 { const_item_pointer().operator +=(n); return (*this); }

References mse::msevector< _Ty, _A >::cipointer::const_item_pointer().

◆ operator-() [1/2]

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

Definition at line 1496 of file msemsevector.h.

1496 { return const_item_pointer() - (_Right_cref.const_item_pointer()); }

References mse::msevector< _Ty, _A >::cipointer::const_item_pointer().

◆ operator-() [2/2]

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

Definition at line 1495 of file msemsevector.h.

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

◆ operator--() [1/2]

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

Definition at line 1488 of file msemsevector.h.

1488 { const_item_pointer().operator --(); return (*this); }

References mse::msevector< _Ty, _A >::cipointer::const_item_pointer().

◆ operator--() [2/2]

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

Definition at line 1489 of file msemsevector.h.

1489 { cipointer _Tmp = *this; --*this; return (_Tmp); }

◆ operator-=()

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

Definition at line 1493 of file msemsevector.h.

1493 { const_item_pointer().operator -=(n); return (*this); }

References mse::msevector< _Ty, _A >::cipointer::const_item_pointer().

◆ operator->()

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

Definition at line 1500 of file msemsevector.h.

1500 { return const_item_pointer().operator->(); }

References mse::msevector< _Ty, _A >::cipointer::const_item_pointer().

◆ operator<()

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

Definition at line 1505 of file msemsevector.h.

1505 { return (const_item_pointer() < _Right.const_item_pointer()); }

References mse::msevector< _Ty, _A >::cipointer::const_item_pointer().

◆ operator<=()

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

Definition at line 1506 of file msemsevector.h.

1506 { return (const_item_pointer() <= _Right.const_item_pointer()); }

References mse::msevector< _Ty, _A >::cipointer::const_item_pointer().

◆ operator=()

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

Definition at line 1502 of file msemsevector.h.

1502 { const_item_pointer().operator=(_Right_cref.const_item_pointer()); return (*this); }

References mse::msevector< _Ty, _A >::cipointer::const_item_pointer().

◆ operator==()

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

Definition at line 1503 of file msemsevector.h.

1503 { return const_item_pointer().operator==(_Right_cref.const_item_pointer()); }

References mse::msevector< _Ty, _A >::cipointer::const_item_pointer().

◆ operator>()

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

Definition at line 1507 of file msemsevector.h.

1507 { return (const_item_pointer() > _Right.const_item_pointer()); }

References mse::msevector< _Ty, _A >::cipointer::const_item_pointer().

◆ operator>=()

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

Definition at line 1508 of file msemsevector.h.

1508 { return (const_item_pointer() >= _Right.const_item_pointer()); }

References mse::msevector< _Ty, _A >::cipointer::const_item_pointer().

◆ operator[]()

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

Definition at line 1501 of file msemsevector.h.

1501 { return const_item_pointer()[_Off]; }

References mse::msevector< _Ty, _A >::cipointer::const_item_pointer().

◆ points_to_an_item()

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

◆ points_to_beginning()

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

◆ points_to_end_marker()

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

◆ position()

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

◆ previous_item()

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

◆ regress()

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

◆ reset()

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

◆ set_to_beginning()

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

◆ set_to_const_item_pointer()

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

◆ set_to_end_marker()

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

◆ set_to_next()

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

◆ set_to_previous()

template<class _Ty , class _A = std::allocator<_Ty>>
void mse::msevector< _Ty, _A >::cipointer::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 1513 of file msemsevector.h.

Field Documentation

◆ m_handle_shptr

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

◆ m_owner_cptr

template<class _Ty , class _A = std::allocator<_Ty>>
const _Myt* mse::msevector< _Ty, _A >::cipointer::m_owner_cptr = nullptr
private

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