MoSync 3.3
MAUtil::List< Type >::ConstListIterator Class Reference

A constant iterator for a list container. More...

#include <MAUtil/List.h>

List of all members.

Public Member Functions

 ConstListIterator (const ListIterator &listIterator)
bool hasNext () const
bool hasPrev () const
const Type & prev ()
const Type & next ()

Friends

class List

Detailed Description

template<typename Type>
class MAUtil::List< Type >::ConstListIterator

A constant iterator for a list container.


Constructor & Destructor Documentation

template<typename Type >
MAUtil::List< Type >::ConstListIterator::ConstListIterator ( const ListIterator listIterator) [inline]

Member Function Documentation

template<typename Type >
bool MAUtil::List< Type >::ConstListIterator::hasNext ( ) const [inline]

Function used to tell if there is a next element.

Returns:
'true' if there is a next element, otherwise 'false'.

References MAUtil::List< Type >::ListNode::mNext, and NULL.

template<typename Type >
bool MAUtil::List< Type >::ConstListIterator::hasPrev ( ) const [inline]

Function used to tell if there is a previous element.

Returns:
'true' if there is a previous element, otherwise 'false'.

References MAUtil::List< Type >::ListNode::mPrev, and NULL.

template<typename Type >
const Type& MAUtil::List< Type >::ConstListIterator::prev ( ) [inline]

Returns the data the iterator points to and attempts to move the iterator backwards.

Returns:
a const reference to the data the iterator points to.

References MAUtil::List< Type >::ListNode::mData, and MAUtil::List< Type >::ListNode::mPrev.

template<typename Type >
const Type& MAUtil::List< Type >::ConstListIterator::next ( ) [inline]

Returns the data the iterator points to and attempts to move the iterator forward.

Returns:
a const reference to the data the iterator points to.

References MAUtil::List< Type >::ListNode::mData, and MAUtil::List< Type >::ListNode::mNext.


Friends And Related Function Documentation

template<typename Type >
friend class List [friend]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines