jvar
JS inspired Variant and Json
jvar::Iter< T > Class Template Reference

Detailed Description

template<class T>
class jvar::Iter< T >

Iter class template is used to iterate over an array as follows:

    for (Iter<Obj> i; arr.forEach(i); )
    {
        foo(i->field);
    }
Examples:
arrays.cpp, and objs.cpp.

#include <arr.h>

Public Member Functions

T * operator-> ()
T & operator* ()
T * operator& ()
int pos ()
const char * key ()

Member Function Documentation

template<class T>
const char* jvar::Iter< T >::key ( ) [inline]
Returns:
Returns the key for the current element if available

Referenced by jvar::PropArray< Variant >::forEach(), and jvar::PropArray< Variant >::forEachSort().

template<class T>
T* jvar::Iter< T >::operator& ( ) [inline]
Returns:
Returns a pointer to the current element
template<class T>
T& jvar::Iter< T >::operator* ( ) [inline]
Returns:
Dereferences the current element
template<class T>
T* jvar::Iter< T >::operator-> ( ) [inline]
Returns:
Returns a reference to the current element
template<class T>
int jvar::Iter< T >::pos ( ) [inline]
Returns:
Returns the position of of the current element in the iterator

The documentation for this class was generated from the following file:
 All Classes Functions Variables Enumerator