basic_pntr< T, lgBC > Class Template Reference

#include <container_classes.h>

Inherited by const_pntr< T, lgBC >, and pntr< T, lgBC >.

Collaboration diagram for basic_pntr< T, lgBC >:
[legend]

Public Types

typedef random_access_iterator_tag iterator_category
typedef T value_type
typedef T & reference
typedef const T & const_reference
typedef T * pointer
typedef const T * const_pointer
typedef size_t size_type
typedef ptrdiff_t difference_type

Public Member Functions

 basic_pntr (T *p0, T *p1, T *p2)
 basic_pntr (T *p0)
 basic_pntr ()
 basic_pntr (const basic_pntr &t)
basic_pntroperator++ ()
basic_pntroperator-- ()
basic_pntroperator+= (const ptrdiff_t n)
basic_pntroperator-= (const ptrdiff_t n)
T & operator* () const
T * operator-> () const
T & operator[] (const ptrdiff_t n) const
bool operator== (const basic_pntr &t) const
bool operator!= (const basic_pntr &t) const
bool operator< (const basic_pntr &t) const
bool operator<= (const basic_pntr &t) const
bool operator> (const basic_pntr &t) const
bool operator>= (const basic_pntr &t) const

Protected Member Functions

 ~basic_pntr ()

Private Member Functions

T * p_index_checked (const ptrdiff_t n) const
void p_set_vals (T *p0, T *p1, T *p2)

Private Attributes

T * p_p [p_nd]

Static Private Attributes

static const int p_nd = lgBC ? 3 : 1

Detailed Description

template<class T, bool lgBC>
class basic_pntr< T, lgBC >

basic_pntr - base class for generalization of normal pointers that enables bounds checking it comes with the full set of operators that you would expect for a random access pointer

Definition at line 35 of file container_classes.h.


Member Typedef Documentation

template<class T , bool lgBC>
typedef const T* basic_pntr< T, lgBC >::const_pointer

Definition at line 73 of file container_classes.h.

template<class T , bool lgBC>
typedef const T& basic_pntr< T, lgBC >::const_reference

Definition at line 71 of file container_classes.h.

template<class T , bool lgBC>
typedef ptrdiff_t basic_pntr< T, lgBC >::difference_type

Definition at line 75 of file container_classes.h.

template<class T , bool lgBC>
typedef random_access_iterator_tag basic_pntr< T, lgBC >::iterator_category

Definition at line 68 of file container_classes.h.

template<class T , bool lgBC>
typedef T* basic_pntr< T, lgBC >::pointer

Definition at line 72 of file container_classes.h.

template<class T , bool lgBC>
typedef T& basic_pntr< T, lgBC >::reference

Definition at line 70 of file container_classes.h.

template<class T , bool lgBC>
typedef size_t basic_pntr< T, lgBC >::size_type

Definition at line 74 of file container_classes.h.

template<class T , bool lgBC>
typedef T basic_pntr< T, lgBC >::value_type

Definition at line 69 of file container_classes.h.


Constructor & Destructor Documentation

template<class T , bool lgBC>
basic_pntr< T, lgBC >::basic_pntr ( T *  p0,
T *  p1,
T *  p2 
) [inline]

Definition at line 78 of file container_classes.h.

References basic_pntr< T, lgBC >::p_set_vals().

Here is the call graph for this function:

template<class T , bool lgBC>
basic_pntr< T, lgBC >::basic_pntr ( T *  p0  )  [inline]

Definition at line 82 of file container_classes.h.

References basic_pntr< T, lgBC >::p_set_vals().

Here is the call graph for this function:

template<class T , bool lgBC>
basic_pntr< T, lgBC >::basic_pntr (  )  [inline]

Definition at line 86 of file container_classes.h.

References basic_pntr< T, lgBC >::p_set_vals().

Here is the call graph for this function:

template<class T , bool lgBC>
basic_pntr< T, lgBC >::basic_pntr ( const basic_pntr< T, lgBC > &  t  )  [inline]

Definition at line 90 of file container_classes.h.

template<class T , bool lgBC>
basic_pntr< T, lgBC >::~basic_pntr (  )  [inline, protected]

Definition at line 96 of file container_classes.h.


Member Function Documentation

template<class T , bool lgBC>
bool basic_pntr< T, lgBC >::operator!= ( const basic_pntr< T, lgBC > &  t  )  const [inline]

Definition at line 131 of file container_classes.h.

References basic_pntr< T, lgBC >::p_p.

template<class T , bool lgBC>
T& basic_pntr< T, lgBC >::operator* (  )  const [inline]

Reimplemented in const_pntr< T, lgBC >.

Definition at line 117 of file container_classes.h.

References basic_pntr< T, lgBC >::p_index_checked().

Here is the call graph for this function:

template<class T , bool lgBC>
basic_pntr& basic_pntr< T, lgBC >::operator++ (  )  [inline]

Reimplemented in pntr< T, lgBC >, and const_pntr< T, lgBC >.

Definition at line 99 of file container_classes.h.

References basic_pntr< T, lgBC >::p_p.

template<class T , bool lgBC>
basic_pntr& basic_pntr< T, lgBC >::operator+= ( const ptrdiff_t  n  )  [inline]

Reimplemented in const_pntr< T, lgBC >.

Definition at line 114 of file container_classes.h.

References basic_pntr< T, lgBC >::p_p.

template<class T , bool lgBC>
basic_pntr& basic_pntr< T, lgBC >::operator-- (  )  [inline]

Reimplemented in pntr< T, lgBC >, and const_pntr< T, lgBC >.

Definition at line 105 of file container_classes.h.

References basic_pntr< T, lgBC >::p_p.

template<class T , bool lgBC>
basic_pntr& basic_pntr< T, lgBC >::operator-= ( const ptrdiff_t  n  )  [inline]

Reimplemented in const_pntr< T, lgBC >.

Definition at line 115 of file container_classes.h.

References basic_pntr< T, lgBC >::p_p.

template<class T , bool lgBC>
T* basic_pntr< T, lgBC >::operator-> (  )  const [inline]

Reimplemented in const_pntr< T, lgBC >.

Definition at line 121 of file container_classes.h.

References basic_pntr< T, lgBC >::p_index_checked().

Here is the call graph for this function:

template<class T , bool lgBC>
bool basic_pntr< T, lgBC >::operator< ( const basic_pntr< T, lgBC > &  t  )  const [inline]

Definition at line 132 of file container_classes.h.

References basic_pntr< T, lgBC >::p_p.

template<class T , bool lgBC>
bool basic_pntr< T, lgBC >::operator<= ( const basic_pntr< T, lgBC > &  t  )  const [inline]

Definition at line 133 of file container_classes.h.

References basic_pntr< T, lgBC >::p_p.

template<class T , bool lgBC>
bool basic_pntr< T, lgBC >::operator== ( const basic_pntr< T, lgBC > &  t  )  const [inline]

Definition at line 130 of file container_classes.h.

References basic_pntr< T, lgBC >::p_p.

template<class T , bool lgBC>
bool basic_pntr< T, lgBC >::operator> ( const basic_pntr< T, lgBC > &  t  )  const [inline]

Definition at line 134 of file container_classes.h.

References basic_pntr< T, lgBC >::p_p.

template<class T , bool lgBC>
bool basic_pntr< T, lgBC >::operator>= ( const basic_pntr< T, lgBC > &  t  )  const [inline]

Definition at line 135 of file container_classes.h.

References basic_pntr< T, lgBC >::p_p.

template<class T , bool lgBC>
T& basic_pntr< T, lgBC >::operator[] ( const ptrdiff_t  n  )  const [inline]

Reimplemented in const_pntr< T, lgBC >.

Definition at line 125 of file container_classes.h.

References basic_pntr< T, lgBC >::p_index_checked().

Here is the call graph for this function:

template<class T , bool lgBC>
T* basic_pntr< T, lgBC >::p_index_checked ( const ptrdiff_t  n  )  const [inline, private]

Definition at line 40 of file container_classes.h.

References OUT_OF_RANGE(), and basic_pntr< T, lgBC >::p_p.

Referenced by basic_pntr< T, lgBC >::operator*(), basic_pntr< T, lgBC >::operator->(), and basic_pntr< T, lgBC >::operator[]().

Here is the call graph for this function:

template<class T , bool lgBC>
void basic_pntr< T, lgBC >::p_set_vals ( T *  p0,
T *  p1,
T *  p2 
) [inline, private]

Definition at line 54 of file container_classes.h.

References basic_pntr< T, lgBC >::p_p.

Referenced by basic_pntr< T, lgBC >::basic_pntr().


Field Documentation

template<class T , bool lgBC>
const int basic_pntr< T, lgBC >::p_nd = lgBC ? 3 : 1 [static, private]

Definition at line 37 of file container_classes.h.

template<class T , bool lgBC>
T* basic_pntr< T, lgBC >::p_p[p_nd] [private]

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 15 Nov 2012 for cloudy by  doxygen 1.6.1