LbmSingleTupleReader Class Reference

LbmSingleTupleReader is a class satisyfing the bitmap tuple reader interface for a single input tuple. More...

#include <LbmTupleReader.h>

Inheritance diagram for LbmSingleTupleReader:

LbmTupleReader List of all members.

Public Member Functions

void init (TupleData &bitmapSegTupleInit)
 Initializes reader to return a specified tuple.
ExecStreamResult read (PTupleData &pTupleData)
 Reads an input tuple.

Private Attributes

bool hasTuple
 Whether the segment reader has a tuple to return.
PTupleData pInputTuple
 Pointer to a tuple data containing the input bitmap tuple.

Detailed Description

LbmSingleTupleReader is a class satisyfing the bitmap tuple reader interface for a single input tuple.

Definition at line 93 of file LbmTupleReader.h.


Member Function Documentation

void LbmSingleTupleReader::init ( TupleData bitmapSegTupleInit  ) 

Initializes reader to return a specified tuple.

Parameters:
bitmapSegTupleInit tuple data for reading tuples

Definition at line 58 of file LbmTupleReader.cpp.

References hasTuple, and pInputTuple.

Referenced by LbmTupleRidReader::init(), and LbmReaderTest::testSingleTupleReader().

00059 {
00060     hasTuple = true;
00061     pInputTuple = &bitmapSegTuple;
00062 }

ExecStreamResult LbmSingleTupleReader::read ( PTupleData pTupleData  )  [virtual]

Reads an input tuple.

The tuple read remains valid until the next call to this method.

Returns:
EXECRC_YIELD if read was successful, EXECRC_EOS if there was no more data to be read, or EXECRC_BUF_UNDERFLOW if an input stream buffer was exhausted

Implements LbmTupleReader.

Definition at line 64 of file LbmTupleReader.cpp.

References EXECRC_EOS, EXECRC_YIELD, hasTuple, and pInputTuple.

Referenced by LbmReaderTest::testSingleTupleReader().

00065 {
00066     if (!hasTuple) {
00067         return EXECRC_EOS;
00068     }
00069     pTupleData = pInputTuple;
00070     hasTuple = false;
00071     return EXECRC_YIELD;
00072 }


Member Data Documentation

bool LbmSingleTupleReader::hasTuple [private]

Whether the segment reader has a tuple to return.

Definition at line 99 of file LbmTupleReader.h.

Referenced by init(), and read().

PTupleData LbmSingleTupleReader::pInputTuple [private]

Pointer to a tuple data containing the input bitmap tuple.

Definition at line 104 of file LbmTupleReader.h.

Referenced by init(), and read().


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