__gnu_cxx::_Pointer_adapter< _Storage_policy >(3)

NAME
__gnu_cxx::_Pointer_adapter< _Storage_policy >

SYNOPSIS

#include <pointer.h>

Inherits _Storage_policy.

  Public Types
typedef std::ptrdiff_t difference_type
typedef _Storage_policy::element_type element_type
typedef std::random_access_iterator_tag iterator_category
typedef _Pointer_adapter pointer
typedef _Reference_type< element_type >::reference reference
typedef _Unqualified_type< element_type >::type value_type

  Public Member Functions
template<typename _Up > _Pointer_adapter (_Up *__arg)
_Pointer_adapter (const _Pointer_adapter &__arg)
template<typename _Up > _Pointer_adapter (const _Pointer_adapter< _Up > &__arg)
_Pointer_adapter (element_type *__arg=0)
operator bool () const
reference operator* () const
_Pointer_adapter & operator++ ()
_Pointer_adapter operator++ (int)
_Pointer_adapter & operator+= (int __offset)
_Pointer_adapter & operator+= (long __offset)
_Pointer_adapter & operator+= (long long __offset)
_Pointer_adapter & operator+= (short __offset)
_Pointer_adapter & operator+= (unsigned int __offset)
_Pointer_adapter & operator+= (unsigned long __offset)
_Pointer_adapter & operator+= (unsigned long long __offset)
_Pointer_adapter & operator+= (unsigned short __offset)
template<typename _Up > std::ptrdiff_t operator- (const _Pointer_adapter< _Up > &__rhs) const
_Pointer_adapter & operator-- ()
_Pointer_adapter operator-- (int)
_Pointer_adapter & operator-= (int __offset)
_Pointer_adapter & operator-= (long __offset)
_Pointer_adapter & operator-= (long long __offset)
_Pointer_adapter & operator-= (short __offset)
_Pointer_adapter & operator-= (unsigned int __offset)
_Pointer_adapter & operator-= (unsigned long __offset)
_Pointer_adapter & operator-= (unsigned long long __offset)
_Pointer_adapter & operator-= (unsigned short __offset)
element_type * operator-> () const
template<typename _Up > _Pointer_adapter & operator= (_Up *__arg)
_Pointer_adapter & operator= (const _Pointer_adapter &__arg)
template<typename _Up > _Pointer_adapter & operator= (const _Pointer_adapter< _Up > &__arg)
reference operator[] (std::ptrdiff_t __index) const

  Friends
_Pointer_adapter operator+ (const _Pointer_adapter &__lhs, int __offset)
_Pointer_adapter operator+ (const _Pointer_adapter &__lhs, long __offset)
_Pointer_adapter operator+ (const _Pointer_adapter &__lhs, long long __offset)
_Pointer_adapter operator+ (const _Pointer_adapter &__lhs, short __offset)
_Pointer_adapter operator+ (const _Pointer_adapter &__lhs, unsigned int __offset)
_Pointer_adapter operator+ (const _Pointer_adapter &__lhs, unsigned long __offset)
_Pointer_adapter operator+ (const _Pointer_adapter &__lhs, unsigned long long __offset)
_Pointer_adapter operator+ (const _Pointer_adapter &__lhs, unsigned short __offset)
_Pointer_adapter operator+ (int __offset, const _Pointer_adapter &__rhs)
_Pointer_adapter operator+ (long __offset, const _Pointer_adapter &__rhs)
_Pointer_adapter operator+ (long long __offset, const _Pointer_adapter &__rhs)
_Pointer_adapter operator+ (short __offset, const _Pointer_adapter &__rhs)
_Pointer_adapter operator+ (unsigned int __offset, const _Pointer_adapter &__rhs)
_Pointer_adapter operator+ (unsigned long __offset, const _Pointer_adapter &__rhs)
_Pointer_adapter operator+ (unsigned long long __offset, const _Pointer_adapter &__rhs)
_Pointer_adapter operator+ (unsigned short __offset, const _Pointer_adapter &__rhs)
template<typename _Up > std::ptrdiff_t operator- (_Up *__lhs, const _Pointer_adapter &__rhs)
template<typename _Up > std::ptrdiff_t operator- (const _Pointer_adapter &__lhs, _Up *__rhs)
std::ptrdiff_t operator- (const _Pointer_adapter &__lhs, element_type *__rhs)
_Pointer_adapter operator- (const _Pointer_adapter &__lhs, int __offset)
_Pointer_adapter operator- (const _Pointer_adapter &__lhs, long __offset)
_Pointer_adapter operator- (const _Pointer_adapter &__lhs, long long __offset)
_Pointer_adapter operator- (const _Pointer_adapter &__lhs, short __offset)
_Pointer_adapter operator- (const _Pointer_adapter &__lhs, unsigned int __offset)
_Pointer_adapter operator- (const _Pointer_adapter &__lhs, unsigned long __offset)
_Pointer_adapter operator- (const _Pointer_adapter &__lhs, unsigned long long __offset)
_Pointer_adapter operator- (const _Pointer_adapter &__lhs, unsigned short __offset)
std::ptrdiff_t operator- (element_type *__lhs, const _Pointer_adapter &__rhs)

Detailed Description

  template<typename _Storage_policy>
class __gnu_cxx::_Pointer_adapter< _Storage_policy >"The following provides an 'alternative pointer' that works with the containers when specified as the pointer typedef of the allocator.

The pointer type used with the containers doesn't have to be this class, but it must support the implicit conversions, pointer arithmetic, comparison operators, etc. that are supported by this class, and avoid raising compile-time ambiguities. Because creating a working pointer can be challenging, this pointer template was designed to wrapper an easier storage policy type, so that it becomes reusable for creating other pointer types.

A key point of this class is also that it allows container writers to 'assume' Allocator::pointer is a typedef for a normal pointer. This class supports most of the conventions of a true pointer, and can, for instance handle implicit conversion to const and base class pointer types. The only impositions on container writers to support extended pointers are: 1) use the Allocator::pointer typedef appropriately for pointer types. 2) if you need pointer casting, use the __pointer_cast<> functions from ext/cast.h. This allows pointer cast operations to be overloaded as necessary by custom pointers.

Note: The const qualifier works with this pointer adapter as follows:

_Tp* == _Pointer_adapter<_Std_pointer_impl<_Tp> >; const _Tp* == _Pointer_adapter<_Std_pointer_impl<const _Tp> >; _Tp* const == const _Pointer_adapter<_Std_pointer_impl<_Tp> >; const _Tp* const == const _Pointer_adapter<_Std_pointer_impl<const _Tp> >;

Definition at line 284 of file pointer.h.

Member Typedef Documentation

  template<typename _Storage_policy > typedef std::ptrdiff_t __gnu_cxx::_Pointer_adapter< _Storage_policy >::difference_type

Definition at line 292 of file pointer.h.

  template<typename _Storage_policy > typedef _Storage_policy::element_type __gnu_cxx::_Pointer_adapter< _Storage_policy >::element_type

Definition at line 287 of file pointer.h.

  template<typename _Storage_policy > typedef std::random_access_iterator_tag __gnu_cxx::_Pointer_adapter< _Storage_policy >::iterator_category

Definition at line 290 of file pointer.h.

  template<typename _Storage_policy > typedef _Pointer_adapter __gnu_cxx::_Pointer_adapter< _Storage_policy >::pointer

Definition at line 293 of file pointer.h.

  template<typename _Storage_policy > typedef _Reference_type<element_type>::reference __gnu_cxx::_Pointer_adapter< _Storage_policy >::reference

Definition at line 294 of file pointer.h.

  template<typename _Storage_policy > typedef _Unqualified_type<element_type>::type __gnu_cxx::_Pointer_adapter< _Storage_policy >::value_type

Definition at line 291 of file pointer.h.

Constructor & Destructor Documentation

  template<typename _Storage_policy > __gnu_cxx::_Pointer_adapter< _Storage_policy >::_Pointer_adapter (element_type * __arg = 0) [inline]

Definition at line 301 of file pointer.h.

  template<typename _Storage_policy > __gnu_cxx::_Pointer_adapter< _Storage_policy >::_Pointer_adapter (const _Pointer_adapter< _Storage_policy > & __arg) [inline]

Definition at line 305 of file pointer.h.

  template<typename _Storage_policy > template<typename _Up > __gnu_cxx::_Pointer_adapter< _Storage_policy >::_Pointer_adapter (_Up * __arg) [inline]

Definition at line 310 of file pointer.h.

  template<typename _Storage_policy > template<typename _Up > __gnu_cxx::_Pointer_adapter< _Storage_policy >::_Pointer_adapter (const _Pointer_adapter< _Up > & __arg) [inline]

Definition at line 316 of file pointer.h.

  template<typename _Storage_policy > __gnu_cxx::_Pointer_adapter< _Storage_policy >::~_Pointer_adapter () [inline]

Definition at line 320 of file pointer.h.

Member Function Documentation

  template<typename _Storage_policy > __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator bool () const [inline], [explicit]

Definition at line 363 of file pointer.h.

  template<typename _Storage_policy > reference __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator* () const [inline]

Definition at line 348 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator++ () [inline]

Definition at line 454 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator++ (int) [inline]

Definition at line 461 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator+= (int __offset) [inline]

Definition at line 443 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator+= (long __offset) [inline]

Definition at line 445 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator+= (long long __offset) [inline]

Definition at line 448 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator+= (short __offset) [inline]

Definition at line 441 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator+= (unsigned int __offset) [inline]

Definition at line 444 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator+= (unsigned long __offset) [inline]

Definition at line 446 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator+= (unsigned long long __offset) [inline]

Definition at line 449 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator+= (unsigned short __offset) [inline]

Definition at line 442 of file pointer.h.

  template<typename _Storage_policy > template<typename _Up > std::ptrdiff_t __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator- (const _Pointer_adapter< _Up > & __rhs) const [inline]

Definition at line 402 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-- () [inline]

Definition at line 469 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-- (int) [inline]

Definition at line 476 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-= (int __offset) [inline]

Definition at line 443 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-= (long __offset) [inline]

Definition at line 445 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-= (long long __offset) [inline]

Definition at line 448 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-= (short __offset) [inline]

Definition at line 441 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-= (unsigned int __offset) [inline]

Definition at line 444 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-= (unsigned long __offset) [inline]

Definition at line 446 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-= (unsigned long long __offset) [inline]

Definition at line 449 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-= (unsigned short __offset) [inline]

Definition at line 442 of file pointer.h.

  template<typename _Storage_policy > element_type * __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-> () const [inline]

Definition at line 353 of file pointer.h.

  template<typename _Storage_policy > template<typename _Up > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator= (_Up * __arg) [inline]

Definition at line 340 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator= (const _Pointer_adapter< _Storage_policy > & __arg) [inline]

Definition at line 324 of file pointer.h.

  template<typename _Storage_policy > template<typename _Up > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator= (const _Pointer_adapter< _Up > & __arg) [inline]

Definition at line 332 of file pointer.h.

  template<typename _Storage_policy > reference __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator[] (std::ptrdiff_t __index) const [inline]

Definition at line 358 of file pointer.h.

Friends And Related Function Documentation

  template<typename _Storage_policy > _Pointer_adapter operator+ (const _Pointer_adapter< _Storage_policy > & __lhs, int __offset) [friend]

Definition at line 443 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator+ (const _Pointer_adapter< _Storage_policy > & __lhs, long __offset) [friend]

Definition at line 445 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator+ (const _Pointer_adapter< _Storage_policy > & __lhs, long long __offset) [friend]

Definition at line 448 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator+ (const _Pointer_adapter< _Storage_policy > & __lhs, short __offset) [friend]

Definition at line 441 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator+ (const _Pointer_adapter< _Storage_policy > & __lhs, unsigned int __offset) [friend]

Definition at line 444 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator+ (const _Pointer_adapter< _Storage_policy > & __lhs, unsigned long __offset) [friend]

Definition at line 446 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator+ (const _Pointer_adapter< _Storage_policy > & __lhs, unsigned long long __offset) [friend]

Definition at line 449 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator+ (const _Pointer_adapter< _Storage_policy > & __lhs, unsigned short __offset) [friend]

Definition at line 442 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator+ (int __offset, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]

Definition at line 443 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator+ (long __offset, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]

Definition at line 445 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator+ (long long __offset, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]

Definition at line 448 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator+ (short __offset, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]

Definition at line 441 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator+ (unsigned int __offset, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]

Definition at line 444 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator+ (unsigned long __offset, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]

Definition at line 446 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator+ (unsigned long long __offset, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]

Definition at line 449 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator+ (unsigned short __offset, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]

Definition at line 442 of file pointer.h.

  template<typename _Storage_policy > template<typename _Up > std::ptrdiff_t operator- (_Up * __lhs, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]

Definition at line 397 of file pointer.h.

  template<typename _Storage_policy > template<typename _Up > std::ptrdiff_t operator- (const _Pointer_adapter< _Storage_policy > & __lhs, _Up * __rhs) [friend]

Definition at line 392 of file pointer.h.

  template<typename _Storage_policy > std::ptrdiff_t operator- (const _Pointer_adapter< _Storage_policy > & __lhs, element_type * __rhs) [friend]

Definition at line 383 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator- (const _Pointer_adapter< _Storage_policy > & __lhs, int __offset) [friend]

Definition at line 443 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator- (const _Pointer_adapter< _Storage_policy > & __lhs, long __offset) [friend]

Definition at line 445 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator- (const _Pointer_adapter< _Storage_policy > & __lhs, long long __offset) [friend]

Definition at line 448 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator- (const _Pointer_adapter< _Storage_policy > & __lhs, short __offset) [friend]

Definition at line 441 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator- (const _Pointer_adapter< _Storage_policy > & __lhs, unsigned int __offset) [friend]

Definition at line 444 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator- (const _Pointer_adapter< _Storage_policy > & __lhs, unsigned long __offset) [friend]

Definition at line 446 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator- (const _Pointer_adapter< _Storage_policy > & __lhs, unsigned long long __offset) [friend]

Definition at line 449 of file pointer.h.

  template<typename _Storage_policy > _Pointer_adapter operator- (const _Pointer_adapter< _Storage_policy > & __lhs, unsigned short __offset) [friend]

Definition at line 442 of file pointer.h.

  template<typename _Storage_policy > std::ptrdiff_t operator- (element_type * __lhs, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]

Definition at line 387 of file pointer.h.

Author

Generated automatically by Doxygen for libstdc++ from the source code.