LbmSegmentReaderBase.h

Go to the documentation of this file.
00001 /*
00002 // $Id: //open/dev/fennel/lucidera/bitmap/LbmSegmentReaderBase.h#11 $
00003 // Fennel is a library of data storage and processing components.
00004 // Copyright (C) 2006-2009 LucidEra, Inc.
00005 // Copyright (C) 2006-2009 The Eigenbase Project
00006 //
00007 // This program is free software; you can redistribute it and/or modify it
00008 // under the terms of the GNU General Public License as published by the Free
00009 // Software Foundation; either version 2 of the License, or (at your option)
00010 // any later version approved by The Eigenbase Project.
00011 //
00012 // This program is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with this program; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020 */
00021 
00022 #ifndef Fennel_LbmSegmentReaderBase_Included
00023 #define Fennel_LbmSegmentReaderBase_Included
00024 
00025 #include "fennel/tuple/TupleData.h"
00026 #include "fennel/exec/ExecStreamDefs.h"
00027 #include "fennel/lucidera/bitmap/LbmSegment.h"
00028 
00029 #include <boost/dynamic_bitset.hpp>
00030 
00031 FENNEL_BEGIN_NAMESPACE
00032 
00040 class FENNEL_LBM_EXPORT LbmSegmentReaderBase
00041     : public LbmSegment
00042 {
00043 protected:
00047     SharedLbmTupleReader pTupleReader;
00048 
00052     uint byteSegLen;
00053 
00057     LbmByteNumber byteSegOffset;
00058 
00062     TupleData *pBitmapSegTuple;
00063 
00067     uint iSrid;
00068     uint iSegmentDesc;
00069     uint iSegments;
00070 
00074     uint zeroBytes;
00075 
00079     uint8_t singleton;
00080 
00084     bool tupleChange;
00085 
00099     void init(
00100         SharedExecStreamBufAccessor &pInAccessorInit,
00101         TupleData &bitmapSegTupleInit,
00102         bool setBitmapInit,
00103         boost::dynamic_bitset<> *pBitmapInit);
00104 
00113     void init(
00114         SharedExecStreamBufAccessor &pInAccessorInit,
00115         TupleData &bitmapSegTupleInit);
00116 
00125     void init(
00126         SharedLbmTupleReader &pTupleReaderInit,
00127         TupleData &bitmapSegTupleInit);
00128 
00142     void init(
00143         SharedLbmTupleReader &pTupleReaderInit,
00144         TupleData &bitmapSegTupleInit,
00145         bool setBitmapInit,
00146         boost::dynamic_bitset<> *pBitmapInit);
00147 
00154     ExecStreamResult readBitmapSegTuple();
00155 
00160     void advanceSegment();
00161 
00162 private:
00166     bool setBitmap;
00167 
00172     boost::dynamic_bitset<> *pBitmap;
00173 
00179     LcsRid maxRidSet;
00180 
00190     void setBitsRead(LcsRid startRid, PBuffer segStart, uint segLen);
00191 
00192 public:
00199     bool getTupleChange();
00200 
00206     void resetChangeListener();
00207 
00215     LcsRid getMaxRidSet();
00216 };
00217 
00218 FENNEL_END_NAMESPACE
00219 
00220 #endif
00221 
00222 // End LbmSegmentReaderBase.h

Generated on Mon Jun 22 04:00:19 2009 for Fennel by  doxygen 1.5.1