SkipNumberStream Class Reference

From (first . More...

#include <LbmExecStreamTestBase.h>

Inheritance diagram for SkipNumberStream:

NumberStream List of all members.

Public Member Functions

 SkipNumberStream (uint first, uint last, uint skip)
NumberStreamclone ()
uint getMaxRowCount (uint maxRid)
bool hasNext ()
uint getNext ()

Static Public Attributes

static const uint BIG_NUMBER = 0xffffffff

Private Attributes

uint first
uint last
uint skip
uint prev
uint next

Detailed Description

From (first .

. last), increments of skip

Definition at line 116 of file LbmExecStreamTestBase.h.


Constructor & Destructor Documentation

SkipNumberStream::SkipNumberStream ( uint  first,
uint  last,
uint  skip 
) [inline]

Definition at line 122 of file LbmExecStreamTestBase.h.

References next.

Referenced by clone().

00123     {
00124         this->first = first;
00125         this->last = last;
00126         this->skip = skip;
00127         next = first;
00128     }


Member Function Documentation

NumberStream* SkipNumberStream::clone (  )  [inline, virtual]

Implements NumberStream.

Definition at line 130 of file LbmExecStreamTestBase.h.

References first, last, skip, and SkipNumberStream().

00131     {
00132         return new SkipNumberStream(first, last, skip);
00133     }

uint SkipNumberStream::getMaxRowCount ( uint  maxRid  )  [inline, virtual]

Implements NumberStream.

Definition at line 135 of file LbmExecStreamTestBase.h.

References first, last, min(), and skip.

00136     {
00137         uint upperBound = std::min(maxRid, last);
00138         return ((upperBound - first) / skip) + 1;
00139     }

bool SkipNumberStream::hasNext (  )  [inline, virtual]

Implements NumberStream.

Definition at line 141 of file LbmExecStreamTestBase.h.

References last, and next.

00142     {
00143         return next <= last;
00144     }

uint SkipNumberStream::getNext (  )  [inline, virtual]

Implements NumberStream.

Definition at line 146 of file LbmExecStreamTestBase.h.

References next, and skip.

00147     {
00148         uint value = next;
00149         next += skip;
00150         return value;
00151     }


Member Data Documentation

uint SkipNumberStream::first [private]

Definition at line 118 of file LbmExecStreamTestBase.h.

Referenced by clone(), and getMaxRowCount().

uint SkipNumberStream::last [private]

Definition at line 118 of file LbmExecStreamTestBase.h.

Referenced by clone(), getMaxRowCount(), and hasNext().

uint SkipNumberStream::skip [private]

Definition at line 118 of file LbmExecStreamTestBase.h.

Referenced by clone(), getMaxRowCount(), and getNext().

uint SkipNumberStream::prev [private]

Definition at line 119 of file LbmExecStreamTestBase.h.

uint SkipNumberStream::next [private]

Definition at line 119 of file LbmExecStreamTestBase.h.

Referenced by getNext(), hasNext(), and SkipNumberStream().

const uint NumberStream::BIG_NUMBER = 0xffffffff [static, inherited]

Definition at line 98 of file LbmExecStreamTestBase.h.

Referenced by UnionNumberStream::findNext(), UnionNumberStream::getNext(), LbmExecStreamTestBase::initBitmapInput(), and UnionNumberStream::UnionNumberStream().


The documentation for this class was generated from the following file:
Generated on Mon Jun 22 04:00:46 2009 for Fennel by  doxygen 1.5.1