proj home

Files   Classes   Functions   Hierarchy  

pnlinkiter< Indx > Class Template Reference

Iterate about pnlink<Index>. More...

#include <pnlink.h>

Collaboration diagram for pnlinkiter< Indx >:

List of all members.

Public Types

typedef pnlink< Indx > link

Public Member Functions

 pnlinkiter (link *_start)
 Construct with a definite link.
void reset ()
 Reset the iterator to the start.
void operator++ ()
 Move to the next link.
boolc operator! () const
 Are there any more links to iterate over?
linkoperator() () const
 Access the current link.
linkoperator-> () const
 Access the current link.

Public Attributes

linkstart
 The start of the circular loop.
linkcurrent
 The current link.


Detailed Description

template<typename Indx>
class pnlinkiter< Indx >

Iterate about pnlink<Index>.

The for loop tests before entry so here the do while loop is used instead.

Example
    pnlinkiterconst<Indx> k(tess.vi[i].start);
    k.reset();
    do
    {
       ...
       ++k;
    } while (!k);

Definition at line 107 of file pnlink.h.


Member Typedef Documentation

template<typename Indx>
typedef pnlink<Indx> pnlinkiter< Indx >::link

Definition at line 111 of file pnlink.h.


Constructor & Destructor Documentation

template<typename Indx>
pnlinkiter< Indx >::pnlinkiter ( link _start  )  [inline]

Construct with a definite link.

Definition at line 119 of file pnlink.h.

00120     : start(_start) {}


Member Function Documentation

template<typename Indx>
boolc pnlinkiter< Indx >::operator! (  )  const [inline]

Are there any more links to iterate over?

Definition at line 129 of file pnlink.h.

References pnlinkiter< Indx >::current, and pnlinkiter< Indx >::start.

00130     { return current != start; }

template<typename Indx>
link* pnlinkiter< Indx >::operator() (  )  const [inline]

Access the current link.

Definition at line 133 of file pnlink.h.

References pnlinkiter< Indx >::current.

00134     { return current; }

template<typename Indx>
void pnlinkiter< Indx >::operator++ (  )  [inline]

Move to the next link.

Definition at line 126 of file pnlink.h.

References pnlinkiter< Indx >::current, and pnlink< Indx >::next.

00127     { assert(current!=0); current = current->next; }

template<typename Indx>
link* pnlinkiter< Indx >::operator-> (  )  const [inline]

Access the current link.

Definition at line 136 of file pnlink.h.

References pnlinkiter< Indx >::current.

00137     { return current; }

template<typename Indx>
void pnlinkiter< Indx >::reset (  )  [inline]


Member Data Documentation

template<typename Indx>
link* pnlinkiter< Indx >::current

template<typename Indx>
link* pnlinkiter< Indx >::start

The start of the circular loop.

Definition at line 114 of file pnlink.h.

Referenced by pnlinkiter< Indx >::operator!(), and pnlinkiter< Indx >::reset().


The documentation for this class was generated from the following file:

Generated on Fri Mar 4 00:50:09 2011 for Chelton Evans Source by  doxygen 1.5.8