aitools::invertedindex::Iterator Class Reference

#include <Iterator.hpp>

List of all members.

Classes

struct  Chunk
struct  Header
struct  Page

Public Types

typedef uint16_t value_size_t
typedef std::vector< value_size_tSizeVector
typedef boost::shared_ptr
< Iterator
SharedPointer

Public Member Functions

 Iterator ()
 Iterator (const Header &header, FILE *page)
 Iterator (const Header &header, ByteBuffer *buffer)
 Iterator (const Header &header, SizeVector *value_sizes, FILE *page)
 Iterator (const Header &header, SizeVector *value_sizes, ByteBuffer *buffer)
 ~Iterator ()
void advance ()
uint16_t checksum () const
const Chunkchunk () const
const SizeVectorvalue_sizes () const
const Headerheader () const
bool is_paged () const
bool is_valid () const
size_t length () const
size_t payload () const
void rewind ()
size_t size () const
bool swap () throw (std::runtime_error)
const char * value () const

Static Public Attributes

static const size_t max_chunk_size = 10 * 1024 * 1024
static const size_t sizeof_value_size_t = sizeof(value_size_t)
static const size_t sizeof_header = sizeof(Header)

Private Attributes

Header header_
SizeVectorvsizes_
Chunk chunk_
Page page_
size_t index_

Detailed Description

A class that represents a iteratable postlist.

Author:
martin.trenkmann@uni-weimar.de

Created on Jun 22, 2008

Id
Iterator.hpp,v 1.11 2010/05/11 23:41:08 trenkman Exp

Definition at line 27 of file Iterator.hpp.


Member Typedef Documentation

Definition at line 35 of file Iterator.hpp.

Definition at line 33 of file Iterator.hpp.

Definition at line 31 of file Iterator.hpp.


Constructor & Destructor Documentation

aitools::invertedindex::Iterator::Iterator (  ) 

Definition at line 7 of file Iterator.cpp.

aitools::invertedindex::Iterator::Iterator ( const Header header,
FILE *  page 
)

Definition at line 12 of file Iterator.cpp.

References length(), swap(), aitools::invertedindex::Iterator::Header::value_size, and vsizes_.

Here is the call graph for this function:

aitools::invertedindex::Iterator::Iterator ( const Header header,
ByteBuffer buffer 
)
aitools::invertedindex::Iterator::Iterator ( const Header header,
SizeVector value_sizes,
FILE *  page 
)

Definition at line 38 of file Iterator.cpp.

References length(), swap(), aitools::invertedindex::Iterator::Header::value_size, and vsizes_.

Here is the call graph for this function:

aitools::invertedindex::Iterator::Iterator ( const Header header,
SizeVector value_sizes,
ByteBuffer buffer 
)
aitools::invertedindex::Iterator::~Iterator (  ) 

Definition at line 66 of file Iterator.cpp.

References vsizes_.


Member Function Documentation

void aitools::invertedindex::Iterator::advance (  ) 

Definition at line 72 of file Iterator.cpp.

References chunk_, aitools::invertedindex::Iterator::Chunk::end, index_, aitools::invertedindex::Iterator::Chunk::offset, size(), and swap().

Here is the call graph for this function:

uint16_t aitools::invertedindex::Iterator::checksum (  )  const

Definition at line 82 of file Iterator.cpp.

References aitools::invertedindex::Iterator::Header::checksum, and header_.

const Iterator::Chunk & aitools::invertedindex::Iterator::chunk (  )  const

Definition at line 88 of file Iterator.cpp.

References chunk_.

const Iterator::Header & aitools::invertedindex::Iterator::header (  )  const

Definition at line 94 of file Iterator.cpp.

References header_.

bool aitools::invertedindex::Iterator::is_paged (  )  const [inline]

Definition at line 134 of file Iterator.hpp.

References aitools::invertedindex::Iterator::Page::file, and page_.

Referenced by rewind().

Here is the caller graph for this function:

bool aitools::invertedindex::Iterator::is_valid (  )  const [inline]
size_t aitools::invertedindex::Iterator::length (  )  const

Definition at line 106 of file Iterator.cpp.

References header_, and aitools::invertedindex::Iterator::Header::value_count.

Referenced by Iterator().

Here is the caller graph for this function:

size_t aitools::invertedindex::Iterator::payload (  )  const

Definition at line 112 of file Iterator.cpp.

References header_, and aitools::invertedindex::Iterator::Header::payload.

void aitools::invertedindex::Iterator::rewind (  ) 
size_t aitools::invertedindex::Iterator::size (  )  const [inline]

Definition at line 150 of file Iterator.hpp.

References header_, index_, and aitools::invertedindex::Iterator::Header::value_size.

Referenced by advance().

Here is the caller graph for this function:

bool aitools::invertedindex::Iterator::swap (  )  throw (std::runtime_error)
const char* aitools::invertedindex::Iterator::value (  )  const [inline]
const Iterator::SizeVector & aitools::invertedindex::Iterator::value_sizes (  )  const

Definition at line 100 of file Iterator.cpp.

References vsizes_.


Member Data Documentation

Definition at line 166 of file Iterator.hpp.

Referenced by advance(), chunk(), Iterator(), rewind(), swap(), and value().

Definition at line 164 of file Iterator.hpp.

Referenced by checksum(), header(), is_valid(), Iterator(), length(), payload(), size(), and swap().

Definition at line 168 of file Iterator.hpp.

Referenced by advance(), is_valid(), rewind(), size(), and swap().

const size_t aitools::invertedindex::Iterator::max_chunk_size = 10 * 1024 * 1024 [static]

Definition at line 104 of file Iterator.hpp.

Referenced by aitools::invertedindex::PostlistBuilder::append(), and swap().

Definition at line 167 of file Iterator.hpp.

Referenced by is_paged(), rewind(), and swap().

Definition at line 106 of file Iterator.hpp.

Definition at line 105 of file Iterator.hpp.

Definition at line 165 of file Iterator.hpp.

Referenced by Iterator(), value_sizes(), and ~Iterator().


The documentation for this class was generated from the following files:
Generated on Wed May 30 15:07:33 2012 by  doxygen 1.6.3