RslArrayIter< T > Class Template Reference

An iterator for array arguments. More...

#include <RslPlugin.h>

List of all members.

Public Member Functions

 RslArrayIter (const RslArg *arg)
 Construct an array iterator from an argument.
 RslArrayIter (const T *data, int length, const RslContext *ctx)
 Construct a uniform array iterator for user-provided data.
T * operator * ()
 Dereference this iterator, yielding a pointer to the start of the array.
T & operator[] (int x)
 The array index operator can be used to access individual array members.
RslArrayIter< T > & operator++ ()
 Increment this iterator to point to the array for the next active point.
RslArrayIter< T > operator++ (int)
 Post-increment this iterator.
bool IsVarying () const
 Returns true if the iterator is varying.
int GetLength () const
 Returns the array length.


Detailed Description

template<typename T>
class RslArrayIter< T >

An iterator for array arguments.

... example here ...


Constructor & Destructor Documentation

template<typename T>
RslArrayIter< T >::RslArrayIter const RslArg arg  )  [inline]
 

Construct an array iterator from an argument.

template<typename T>
RslArrayIter< T >::RslArrayIter const T *  data,
int  length,
const RslContext ctx
[inline]
 

Construct a uniform array iterator for user-provided data.

This is useful for optional arguments with default values.


Member Function Documentation

template<typename T>
int RslArrayIter< T >::GetLength  )  const [inline]
 

Returns the array length.

template<typename T>
bool RslArrayIter< T >::IsVarying  )  const [inline]
 

Returns true if the iterator is varying.

Note that uniform iterators need not be incremented (although it does no harm).

template<typename T>
T* RslArrayIter< T >::operator *  )  [inline]
 

Dereference this iterator, yielding a pointer to the start of the array.

template<typename T>
RslArrayIter<T> RslArrayIter< T >::operator++ int   )  [inline]
 

Post-increment this iterator.

Returns a copy of the iterator prior to incrementing, so it's not terribly efficient. The dummy integer argument is the standard C++ way of distinguishing between pre- and post-increment operators.

template<typename T>
RslArrayIter<T>& RslArrayIter< T >::operator++  )  [inline]
 

Increment this iterator to point to the array for the next active point.

An internal acceleration structure makes this a constant-time operation.

template<typename T>
T& RslArrayIter< T >::operator[] int  x  )  [inline]
 

The array index operator can be used to access individual array members.


The documentation for this class was generated from the following file:
Generated on Wed May 10 15:56:09 2006 for PRManHeaders by  doxygen 1.4.6