#include <TupleProjectionAccessor.h>
Public Member Functions | |
TupleProjectionAccessor () | |
void | bind (TupleAccessor const &tupleAccessor, TupleProjection const &tupleProjection) |
virtual | ~TupleProjectionAccessor () |
void | unmarshal (TupleData &tuple) const |
void | unmarshal (TupleData::iterator tupleIter) const |
uint | size () const |
Private Attributes | |
TupleAccessor const * | pTupleAccessor |
std::vector< AttributeAccessor const * > | ppAttributeAccessors |
Definition at line 40 of file TupleProjectionAccessor.h.
TupleProjectionAccessor::TupleProjectionAccessor | ( | ) | [explicit] |
Definition at line 32 of file TupleProjectionAccessor.cpp.
References pTupleAccessor.
00033 { 00034 pTupleAccessor = NULL; 00035 }
TupleProjectionAccessor::~TupleProjectionAccessor | ( | ) | [virtual] |
void TupleProjectionAccessor::bind | ( | TupleAccessor const & | tupleAccessor, | |
TupleProjection const & | tupleProjection | |||
) |
Definition at line 41 of file TupleProjectionAccessor.cpp.
References TupleAccessor::getAttributeAccessor(), ppAttributeAccessors, and pTupleAccessor.
Referenced by ExecStreamBufAccessor::bindProjection(), BTreeAccessBase::BTreeAccessBase(), ExternalSortMerger::ExternalSortMerger(), ExternalSortRunLoader::ExternalSortRunLoader(), ReshapeExecStream::initCompareData(), LcsClusterReplaceExecStream::initTupleLoadParams(), BTreeSearchExecStream::open(), BTreeReadExecStream::open(), BTreeSearchExecStream::prepare(), ReshapeExecStream::prepare(), and BTreeBuilder::truncateExternal().
00044 { 00045 pTupleAccessor = &tupleAccessor; 00046 ppAttributeAccessors.clear(); 00047 for (uint i = 0; i < tupleProjection.size(); ++i) { 00048 ppAttributeAccessors.push_back( 00049 &(tupleAccessor.getAttributeAccessor(tupleProjection[i]))); 00050 } 00051 }
void TupleProjectionAccessor::unmarshal | ( | TupleData & | tuple | ) | const [inline] |
Definition at line 54 of file TupleProjectionAccessor.h.
Referenced by ReshapeExecStream::castOutput(), BTreeSearchExecStream::checkNextKey(), ReshapeExecStream::compareInput(), BTreeScanExecStream::execute(), ReshapeExecStream::execute(), LcsClusterReplaceExecStream::getTupleForLoad(), ExternalSortMerger::heapify(), BTreeSearchExecStream::innerFetchLoop(), BTreePrefetchSearchExecStream::innerSearchLoop(), ExternalSortRunLoader::quickSortFindPivot(), ExternalSortRunLoader::quickSortPartition(), BTreeSearchExecStream::readDirectives(), BTreeSearchExecStream::readSearchKey(), BTreeSearchExecStream::readUpperBoundKey(), BTreeSearchExecStream::searchForKey(), BTreeSearchExecStream::testInterval(), BTreeBuilder::truncateExternal(), and ExecStreamBufAccessor::unmarshalProjectedTuple().
00055 { 00056 unmarshal(tuple.begin()); 00057 }
void TupleProjectionAccessor::unmarshal | ( | TupleData::iterator | tupleIter | ) | const |
Definition at line 53 of file TupleProjectionAccessor.cpp.
References ppAttributeAccessors, and pTupleAccessor.
00054 { 00055 for (uint i = 0; i < ppAttributeAccessors.size(); ++i, ++tupleIter) { 00056 ppAttributeAccessors[i]->unmarshalValue( 00057 *pTupleAccessor, 00058 *tupleIter); 00059 } 00060 }
uint TupleProjectionAccessor::size | ( | ) | const [inline] |
Definition at line 61 of file TupleProjectionAccessor.h.
Referenced by BTreeSearchExecStream::readDirectives(), BTreeSearchExecStream::readSearchKey(), and BTreeSearchExecStream::searchForKey().
00062 { 00063 return ppAttributeAccessors.size(); 00064 }
TupleAccessor const* TupleProjectionAccessor::pTupleAccessor [private] |
Definition at line 42 of file TupleProjectionAccessor.h.
Referenced by bind(), TupleProjectionAccessor(), and unmarshal().
std::vector<AttributeAccessor const *> TupleProjectionAccessor::ppAttributeAccessors [private] |