2010-01-23 02:13:59 +00:00
|
|
|
#ifndef _LOG_ITERATORS_H_
|
|
|
|
#define _LOG_ITERATORS_H_
|
|
|
|
|
|
|
|
template <class TUPLE>
|
|
|
|
class DataPage;
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
template <class TUPLE>
|
2010-02-20 01:18:39 +00:00
|
|
|
class diskTreeIterator
|
2010-01-23 02:13:59 +00:00
|
|
|
{
|
|
|
|
|
2010-01-28 02:20:49 +00:00
|
|
|
public:
|
2010-02-20 01:18:39 +00:00
|
|
|
explicit diskTreeIterator(recordid tree);
|
2010-01-23 02:13:59 +00:00
|
|
|
|
2010-02-20 01:18:39 +00:00
|
|
|
explicit diskTreeIterator(recordid tree,TUPLE &key);
|
|
|
|
|
|
|
|
explicit diskTreeIterator(diskTreeComponent *tree);
|
|
|
|
|
|
|
|
explicit diskTreeIterator(diskTreeComponent *tree,TUPLE &key);
|
|
|
|
|
|
|
|
~diskTreeIterator();
|
2010-01-23 02:13:59 +00:00
|
|
|
|
2010-03-09 19:02:54 +00:00
|
|
|
TUPLE * next_callerFrees();
|
2010-01-23 02:13:59 +00:00
|
|
|
|
|
|
|
private:
|
2010-02-20 01:18:39 +00:00
|
|
|
void init_iterators(TUPLE * key1, TUPLE * key2);
|
2010-02-25 01:29:32 +00:00
|
|
|
inline void init_helper(TUPLE* key1);
|
2010-01-23 02:13:59 +00:00
|
|
|
|
2010-02-20 01:18:39 +00:00
|
|
|
explicit diskTreeIterator() { abort(); }
|
|
|
|
void operator=(diskTreeIterator & t) { abort(); }
|
|
|
|
int operator-(diskTreeIterator & t) { abort(); }
|
2010-01-23 02:13:59 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
recordid tree_; //root of the tree
|
|
|
|
|
2010-03-09 00:09:38 +00:00
|
|
|
diskTreeComponent::iterator* lsmIterator_;
|
2010-01-23 02:13:59 +00:00
|
|
|
|
|
|
|
pageid_t curr_pageid; //current page id
|
|
|
|
DataPage<TUPLE> *curr_page; //current page
|
2010-03-09 00:14:24 +00:00
|
|
|
typedef typename DataPage<TUPLE>::iterator DPITR_T;
|
2010-01-23 02:13:59 +00:00
|
|
|
DPITR_T *dp_itr;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|