TupleProjection Class Reference

A TupleProjection specifies a projection of a tuple, as explained in the design docs. More...

#include <TupleDescriptor.h>

Inheritance diagram for TupleProjection:

VectorOfUint List of all members.

Public Member Functions

void writePersistent (ByteOutputStream &) const
void readPersistent (ByteInputStream &)
void projectFrom (TupleProjection const &sourceProjection, TupleProjection const &tupleProjection)

Detailed Description

A TupleProjection specifies a projection of a tuple, as explained in the design docs.

Definition at line 62 of file TupleDescriptor.h.


Member Function Documentation

void TupleProjection::writePersistent ( ByteOutputStream  )  const

Definition at line 238 of file TupleDescriptor.cpp.

References ByteOutputStream::writeValue().

Referenced by FtrsTableWriter::describeIndex(), FtrsTableWriter::describeParticipant(), and BTreeWriter::describeParticipant().

00240 {
00241     uint32_t iData = htonl(size());
00242     stream.writeValue(iData);
00243     for (uint i = 0; i < size(); ++i) {
00244         iData = htonl((*this)[i]);
00245         stream.writeValue(iData);
00246     }
00247 }

void TupleProjection::readPersistent ( ByteInputStream  ) 

Definition at line 249 of file TupleDescriptor.cpp.

References ByteInputStream::readValue().

Referenced by FtrsTableWriterFactory::loadIndex(), FtrsTableWriterFactory::loadParticipant(), and BTreeRecoveryFactory::loadParticipant().

00251 {
00252     clear();
00253     uint32_t n;
00254     stream.readValue(n);
00255     n = ntohl(n);
00256     for (uint i = 0; i < n; ++i) {
00257         uint32_t iData;
00258         stream.readValue(iData);
00259         push_back(ntohl(iData));
00260     }
00261 }

void TupleProjection::projectFrom ( TupleProjection const &  sourceProjection,
TupleProjection const &  tupleProjection 
)

Definition at line 263 of file TupleDescriptor.cpp.

Referenced by LhxJoinExecStream::setHashInfo().

00266 {
00267     clear();
00268     for (uint i = 0; i < tupleProjection.size(); ++i) {
00269         push_back(sourceProjection[tupleProjection[i]]);
00270     }
00271 }


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