Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

cmt_list< T >::const_iterator Class Reference

#include <cmt_list.h>

Collaboration diagram for cmt_list< T >::const_iterator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 const_iterator ()
 const_iterator (const Node node)
const_iteratoroperator++ ()
const_iteratoroperator-- ()
int operator== (const const_iterator &other) const
int operator!= (const const_iterator &other) const
const T & operator * () const
const Node get_node () const

Private Attributes

const Node m_node

template<class T>
class cmt_list< T >::const_iterator


Constructor & Destructor Documentation

template<class T>
cmt_list< T >::const_iterator::const_iterator  )  [inline]
 

Definition at line 98 of file cmt_list.h.

References cmt_list< T >::const_iterator::m_node.

00098                       : m_node (0)
00099     {
00100     }

template<class T>
cmt_list< T >::const_iterator::const_iterator const Node  node  )  [inline]
 

Definition at line 102 of file cmt_list.h.

References cmt_list< T >::const_iterator::m_node, and cmt_list< T >::Node.

00102                                      : m_node (node)
00103     {
00104     }


Member Function Documentation

template<class T>
const Node cmt_list< T >::const_iterator::get_node  )  const [inline]
 

Definition at line 144 of file cmt_list.h.

References cmt_list< T >::const_iterator::m_node, and cmt_list< T >::Node.

Referenced by cmt_list< T >::erase().

00145     {
00146       return (m_node);
00147     }

template<class T>
const T& cmt_list< T >::const_iterator::operator *  )  const [inline]
 

Definition at line 131 of file cmt_list.h.

References cmt_list< T >::const_iterator::m_node, and cmt_list_node< T >::m_t.

00132     {
00133       if (m_node == 0)
00134         {
00135           static const T t;
00136           return (t);
00137         }
00138       else
00139         {
00140           return (m_node->m_t);
00141         }
00142     }

template<class T>
int cmt_list< T >::const_iterator::operator!= const const_iterator other  )  const [inline]
 

Definition at line 125 of file cmt_list.h.

00126     {
00127       const iterator& me = *this;
00128       return (! (me == other));
00129     }

template<class T>
const_iterator& cmt_list< T >::const_iterator::operator++  )  [inline]
 

Definition at line 106 of file cmt_list.h.

References cmt_list< T >::const_iterator::m_node, and cmt_list_node< T >::m_right.

00107     {
00108       if (m_node == 0) return (*this);
00109       m_node = m_node->m_right;
00110       return (*this);
00111     }

template<class T>
const_iterator& cmt_list< T >::const_iterator::operator--  )  [inline]
 

Definition at line 113 of file cmt_list.h.

References cmt_list_node< T >::m_left, and cmt_list< T >::const_iterator::m_node.

00114     {
00115       if (m_node == 0) return (*this);
00116       m_node = m_node->m_left;
00117       return (*this);
00118     }

template<class T>
int cmt_list< T >::const_iterator::operator== const const_iterator other  )  const [inline]
 

Definition at line 120 of file cmt_list.h.

References cmt_list< T >::const_iterator::m_node.

00121     {
00122       return (m_node == other.m_node);
00123     }


Member Data Documentation

template<class T>
const Node cmt_list< T >::const_iterator::m_node [private]
 

Definition at line 150 of file cmt_list.h.

Referenced by cmt_list< T >::const_iterator::const_iterator(), cmt_list< T >::const_iterator::get_node(), cmt_list< T >::const_iterator::operator *(), cmt_list< T >::const_iterator::operator++(), cmt_list< T >::const_iterator::operator--(), and cmt_list< T >::const_iterator::operator==().


The documentation for this class was generated from the following file:
Generated on Mon May 2 10:25:29 2005 for CMT by doxygen 1.3.5