Zero  0.1.0
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
PageIterator Class Reference

#include <iterator.h>

Inheritance diagram for PageIterator:
thread_wrapper_t

Public Member Functions

 PageIterator (string inPath, string outPath, unsigned ioSizeInPages=128)
 
 PageIterator (string inPath, string outPath, AsyncRingBuffer *buffer, unsigned ioSizeInPages=128)
 
virtual ~PageIterator ()
 
generic_pagenext ()
 
bool hasNext ()
 
long getCount ()
 
void writePage (char *buf, size_t index)
 
virtual void run ()
 
void seek (size_t pageIndex)
 
- Public Member Functions inherited from thread_wrapper_t
 thread_wrapper_t ()
 
virtual ~thread_wrapper_t ()
 
virtual void before_run ()
 
virtual void after_run ()
 
void spawn ()
 
void fork ()
 
void join ()
 

Static Public Attributes

static const size_t PAGE_SIZE = 8192
 

Private Member Functions

void openOutput ()
 
void readBlock (char *b)
 
void writeBlock (char *b)
 

Private Attributes

string inPath
 
string outPath
 
size_t blockSize
 
ifstream in
 
ofstream out
 
long count
 
off_t fpos
 
size_t bpos
 
size_t bytesRead
 
int blocksRead
 
char * buf
 
generic_page currentPage
 
PageID prevPageNo
 
AsyncRingBufferasyncBuf
 

Constructor & Destructor Documentation

§ PageIterator() [1/2]

PageIterator::PageIterator ( string  inPath,
string  outPath,
unsigned  ioSizeInPages = 128 
)

§ PageIterator() [2/2]

PageIterator::PageIterator ( string  inPath,
string  outPath,
AsyncRingBuffer buffer,
unsigned  ioSizeInPages = 128 
)

§ ~PageIterator()

PageIterator::~PageIterator ( )
virtual

Member Function Documentation

§ getCount()

long PageIterator::getCount ( )
inline

§ hasNext()

bool PageIterator::hasNext ( )

§ next()

generic_page * PageIterator::next ( )

§ openOutput()

void PageIterator::openOutput ( )
private

§ readBlock()

void PageIterator::readBlock ( char *  b)
private

§ run()

void PageIterator::run ( )
virtual

Implements thread_wrapper_t.

§ seek()

void PageIterator::seek ( size_t  pageIndex)

§ writeBlock()

void PageIterator::writeBlock ( char *  b)
private

§ writePage()

void PageIterator::writePage ( char *  buf,
size_t  index 
)

Member Data Documentation

§ asyncBuf

AsyncRingBuffer* PageIterator::asyncBuf
private

§ blockSize

size_t PageIterator::blockSize
private

§ blocksRead

int PageIterator::blocksRead
private

§ bpos

size_t PageIterator::bpos
private

§ buf

char* PageIterator::buf
private

§ bytesRead

size_t PageIterator::bytesRead
private

§ count

long PageIterator::count
private

§ currentPage

generic_page PageIterator::currentPage
private

§ fpos

off_t PageIterator::fpos
private

§ in

ifstream PageIterator::in
private

§ inPath

string PageIterator::inPath
private

§ out

ofstream PageIterator::out
private

§ outPath

string PageIterator::outPath
private

§ PAGE_SIZE

const size_t PageIterator::PAGE_SIZE = 8192
static

§ prevPageNo

PageID PageIterator::prevPageNo
private

The documentation for this class was generated from the following files: