SourceForge.net Logo timeSeries: timeSeries Class Library

stateFlag::iterator< C > Class Template Reference

iterates over edges in a stateFlag More...

#include <stateFlag.h>

Collaboration diagram for stateFlag::iterator< C >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 iterator (const stateFlag &sf)
 iterator (const stateFlag &sf, int start)
int index () const
int operator* ()
iterator< C > & operator++ ()
iterator< C > operator++ (int foo)
iterator< C > & operator-- ()
iterator< C > operator-- (int foo)
bool operator== (iterator< C > it) const
bool operator!= (iterator< C > it) const
template<class D >
bool operator> (iterator< D > it) const
template<class D >
bool operator>= (iterator< D > it) const
template<class D >
bool operator< (iterator< D > it) const
template<class D >
bool operator<= (iterator< D > it) const

Friends

class stateFlag

Detailed Description

template<class C>
class stateFlag::iterator< C >

iterates over edges in a stateFlag

C is the comparator class. It should be one of rising, falling or change.

Examples:

campVIRTTEXAnalysis.cpp, and hmi04.cpp.


Constructor & Destructor Documentation

template<class C>
stateFlag::iterator< C >::iterator ( const stateFlag sf  )  [inline, explicit]

stateFlag iterator constructor

Parameters:
stateFlag a stateFlag object Constructs a stateFlag::iterator from a stateFlag object. The iterator is not positioned at an edge when it is returned from this function. Its position is the minimum index of the stateFlag.

The iterator must incremented before it points to an edge.

template<class C>
stateFlag::iterator< C >::iterator ( const stateFlag sf,
int  start 
) [inline]

stateFlag iterator constructor

Parameters:
stateFlag a stateFlag object
start an int containing the initial index of the iterator Constructs a stateFlag::iterator from a stateFlag object. The iterator is not positioned at an edge when it is returned from this function. Its position is at the index specified by start.

Use this constructor if you want to begin the search for a new edge at a location other than the beginning of the stateFlag.

The iterator must incremented before it points to an edge.


Member Function Documentation

template<class C>
int stateFlag::iterator< C >::index (  )  const [inline]

index of an iterator

Returns:
returns the current index as an int
template<class C>
bool stateFlag::iterator< C >::operator!= ( iterator< C >  it  )  const [inline]

not equal

Parameters:
it is an iterator
Returns:
returns true if the indices of the iterators are not equal
template<class C>
int stateFlag::iterator< C >::operator* (  )  [inline]

dereference

Returns:
returns the value of stateFlag at the current index of the iterator
template<class C>
iterator<C> stateFlag::iterator< C >::operator++ ( int  foo  )  [inline]

post-increment

Advances the iterator to the next edge

Returns:
returns the value of the iterator before it has been incremented If no edge is found the iterator points to the maximum index of the stateFlag object.
template<class C>
iterator<C>& stateFlag::iterator< C >::operator++ (  )  [inline]

pre-increment

Advances the iterator to the next edge

Returns:
returns the value of the iterator after it has been incremented If no edge is found the iterator points to the maximum index of the stateFlag object.
template<class C>
iterator<C> stateFlag::iterator< C >::operator-- ( int  foo  )  [inline]

post-decrement

Decrements the iterator to the previous edge

Returns:
returns the value of the iterator before it has been decremented. If no edge is found the iterator points to the minimum index of the stateFlag object.
template<class C>
iterator<C>& stateFlag::iterator< C >::operator-- (  )  [inline]

pre-decrement

Decrements the iterator to the previous edge

Returns:
returns the value of the iterator after it has been decremented. If no edge is found the iterator points to the minimum index of the stateFlag object.
template<class C>
template<class D >
bool stateFlag::iterator< C >::operator< ( iterator< D >  it  )  const [inline]

less than

Parameters:
it is an iterator
Returns:
returns true if the index of left iterator is less than the index of the right iterator
template<class C>
template<class D >
bool stateFlag::iterator< C >::operator<= ( iterator< D >  it  )  const [inline]

less than or equal to

Parameters:
it is an iterator
Returns:
returns true if the index of left iterator is less than or equal to the index of the right iterator
template<class C>
bool stateFlag::iterator< C >::operator== ( iterator< C >  it  )  const [inline]

equals

Parameters:
it is an iterator
Returns:
returns true if the indices of iterators are equal
template<class C>
template<class D >
bool stateFlag::iterator< C >::operator> ( iterator< D >  it  )  const [inline]

greater than

Parameters:
it is an iterator
Returns:
returns true if the index of left iterator is greater than the index of the right iterator
template<class C>
template<class D >
bool stateFlag::iterator< C >::operator>= ( iterator< D >  it  )  const [inline]

greater than or equal to

Parameters:
it is an iterator
Returns:
returns true if the index of left iterator is greater than or equal to the index of the right iterator
Generated on Tue Mar 16 15:10:52 2010 for timeSeries by  doxygen 1.6.3