DupColumnGenerator Class Reference

Duplicate column generator. More...

#include <ExecStreamGenerator.h>

Inheritance diagram for DupColumnGenerator:

ColumnGenerator< T > List of all members.

Public Member Functions

 DupColumnGenerator (int numDupsInit, int startValue=0)
int64_t next ()

Private Attributes

int numDups
int64_t curValue

Detailed Description

Duplicate column generator.

Generates numDups duplicate rows per value for a column, in sequence, starting at initValue

Definition at line 391 of file ExecStreamGenerator.h.


Constructor & Destructor Documentation

DupColumnGenerator::DupColumnGenerator ( int  numDupsInit,
int  startValue = 0 
) [inline, explicit]

Definition at line 397 of file ExecStreamGenerator.h.

References curValue, and numDups.

00397                                                                      {
00398         assert(numDupsInit > 0);
00399         numDups = numDupsInit;
00400         curValue = startValue * numDups;
00401     }


Member Function Documentation

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

Implements ColumnGenerator< T >.

Definition at line 403 of file ExecStreamGenerator.h.

References curValue, and numDups.

00404     {
00405         return (curValue++ / numDups);
00406     }


Member Data Documentation

int DupColumnGenerator::numDups [private]

Definition at line 393 of file ExecStreamGenerator.h.

Referenced by DupColumnGenerator(), and next().

int64_t DupColumnGenerator::curValue [private]

Definition at line 394 of file ExecStreamGenerator.h.

Referenced by DupColumnGenerator(), and next().


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