RepeatingSeqColumnGenerator Class Reference

A repeating column sequence generator. More...

#include <ExecStreamGenerator.h>

Inheritance diagram for RepeatingSeqColumnGenerator:

ColumnGenerator< T > List of all members.

Public Member Functions

 RepeatingSeqColumnGenerator (int nSequenceInit)
int64_t next ()

Private Attributes

int nSequence
int64_t curValue

Detailed Description

A repeating column sequence generator.

Generates column values in a repeating sequence. Values repeat after nSequence values. E.g., 0, 1, 2, ..., nSequence-1, 0, 1, 2, ..., nSequence-1, 0, ...

Definition at line 447 of file ExecStreamGenerator.h.


Constructor & Destructor Documentation

RepeatingSeqColumnGenerator::RepeatingSeqColumnGenerator ( int  nSequenceInit  )  [inline, explicit]

Definition at line 453 of file ExecStreamGenerator.h.

References curValue, and nSequence.

00453                                                             {
00454         assert(nSequenceInit > 0);
00455         nSequence = nSequenceInit;
00456         curValue = 0;
00457     }


Member Function Documentation

int64_t RepeatingSeqColumnGenerator::next (  )  [inline, virtual]

Implements ColumnGenerator< T >.

Definition at line 459 of file ExecStreamGenerator.h.

References curValue, and nSequence.

00460     {
00461         return curValue++ % nSequence;
00462     }


Member Data Documentation

int RepeatingSeqColumnGenerator::nSequence [private]

Definition at line 449 of file ExecStreamGenerator.h.

Referenced by next(), and RepeatingSeqColumnGenerator().

int64_t RepeatingSeqColumnGenerator::curValue [private]

Definition at line 450 of file ExecStreamGenerator.h.

Referenced by next(), and RepeatingSeqColumnGenerator().


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