DataPage::RecordIterator -> DataPage::iterator
git-svn-id: svn+ssh://svn.corp.yahoo.com/yahoo/yrl/labs/pnuts/code/logstore@672 8dad8b1f-cf64-0410-95b6-bcf113ffbcfe
This commit is contained in:
parent
452ee97442
commit
220d58bd7c
4 changed files with 8 additions and 8 deletions
|
@ -265,7 +265,7 @@ bool DataPage<TUPLE>::append(TUPLE const * dat)
|
|||
template <class TUPLE>
|
||||
bool DataPage<TUPLE>::recordRead(typename TUPLE::key_t key, size_t keySize, TUPLE ** buf)
|
||||
{
|
||||
RecordIterator itr(this, NULL);
|
||||
iterator itr(this, NULL);
|
||||
|
||||
int match = -1;
|
||||
while((*buf=itr.getnext()) != 0)
|
||||
|
@ -298,7 +298,7 @@ bool DataPage<TUPLE>::recordRead(typename TUPLE::key_t key, size_t keySize, TUP
|
|||
|
||||
|
||||
template <class TUPLE>
|
||||
TUPLE* DataPage<TUPLE>::RecordIterator::getnext()
|
||||
TUPLE* DataPage<TUPLE>::iterator::getnext()
|
||||
{
|
||||
len_t len;
|
||||
bool succ;
|
||||
|
|
|
@ -14,7 +14,7 @@ class DataPage
|
|||
{
|
||||
public:
|
||||
|
||||
class RecordIterator
|
||||
class iterator
|
||||
{
|
||||
private:
|
||||
void scan_to_key(TUPLE * key) {
|
||||
|
@ -37,11 +37,11 @@ public:
|
|||
}
|
||||
}
|
||||
public:
|
||||
RecordIterator(DataPage *dp, TUPLE * key=NULL) : read_offset_(0), dp(dp) {
|
||||
iterator(DataPage *dp, TUPLE * key=NULL) : read_offset_(0), dp(dp) {
|
||||
scan_to_key(key);
|
||||
}
|
||||
|
||||
void operator=(const RecordIterator &rhs)
|
||||
void operator=(const iterator &rhs)
|
||||
{
|
||||
this->read_offset_ = rhs.read_offset_;
|
||||
this->dp = rhs.dp;
|
||||
|
@ -188,7 +188,7 @@ public:
|
|||
inline uint16_t recordCount();
|
||||
|
||||
|
||||
RecordIterator begin(){return RecordIterator(this);}
|
||||
iterator begin(){return iterator(this);}
|
||||
|
||||
pageid_t get_start_pid(){return first_page_;}
|
||||
int get_page_count(){return page_count_;}
|
||||
|
|
|
@ -170,7 +170,7 @@ private:
|
|||
|
||||
pageid_t curr_pageid; //current page id
|
||||
DataPage<TUPLE> *curr_page; //current page
|
||||
typedef typename DataPage<TUPLE>::RecordIterator DPITR_T;
|
||||
typedef typename DataPage<TUPLE>::iterator DPITR_T;
|
||||
DPITR_T *dp_itr;
|
||||
};
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ void insertProbeIter(size_t NUM_ENTRIES)
|
|||
for(int i = 0; i < dpages ; i++)
|
||||
{
|
||||
DataPage<datatuple> dp(xid, dsp[i]);
|
||||
DataPage<datatuple>::RecordIterator itr = dp.begin();
|
||||
DataPage<datatuple>::iterator itr = dp.begin();
|
||||
datatuple *dt=0;
|
||||
while( (dt=itr.getnext()) != NULL)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue