Mp7Jrs  2.7.1
Mp7JrsEnumerator< C > Class Template Reference

Enumerator template. More...

Public Member Functions

 Mp7JrsEnumerator (const Mp7JrsEnumerator< C > &e)
Mp7JrsEnumerator< C > & operator= (const Mp7JrsEnumerator< C > &e)
bool operator== (const Mp7JrsEnumerator< C > &e) const
bool operator!= (const Mp7JrsEnumerator< C > &e) const
bool HasNext () const
 Checks if there are more elements in the enumerator when iterating in forward direction.
bool HasPrevious () const
 Checks if there are more elements in the enumerator when iterating in reverse direction.
C GetNext ()
 Gets the next element.
C GetPrevious ()
 Gets the previous element.
C ElementAt (unsigned int i) const
 Gets the element at the specified position.
C GetFirst () const
 Gets the first element.
C GetLast () const
 Gets the last element.
void Clear ()
 Removes all elements from the enumerator.
void Insert (const C &item)
 Adds an item to the enumeration.
void Insert (const Mp7JrsEnumerator< C > &e)
 Adds the contents of an enumeration to this enumeration.
unsigned int Size () const
 Gets the number of elements of the enumerator.

Detailed Description

template<class C>
class Mp7JrsEnumerator< C >

Enumerator template.

Member Function Documentation

template<class C >
C Mp7JrsEnumerator< C >::ElementAt ( unsigned int  i) const
inline

Gets the element at the specified position.

Parameters
iThe position of the element to be retrieved.
Returns
The element at the specified position.
template<class C >
C Mp7JrsEnumerator< C >::GetNext ( )
inline

Gets the next element.

Returns
A smart pointer to the next element.
template<class C >
C Mp7JrsEnumerator< C >::GetPrevious ( )
inline

Gets the previous element.

Returns
A smart pointer to the previous element.
template<class C >
bool Mp7JrsEnumerator< C >::HasNext ( ) const
inline

Checks if there are more elements in the enumerator when iterating in forward direction.

Returns
True if there are more elements, false otherwise.
template<class C >
bool Mp7JrsEnumerator< C >::HasPrevious ( ) const
inline

Checks if there are more elements in the enumerator when iterating in reverse direction.

Returns
True if there are more elements, false otherwise.