#include <PostlistReader.hpp>
Public Types | |
typedef boost::shared_ptr < PostlistReader > | shared_pointer |
Public Member Functions | |
PostlistReader () | |
PostlistReader (const bfs::path &path) throw (std::invalid_argument) | |
~PostlistReader () | |
void | close () |
bool | is_open () const |
void | open (const bfs::path &path) throw (std::runtime_error, std::invalid_argument) |
Iterator::SharedPointer | read (size_t length=INT_MAX) throw (std::runtime_error) |
const bfs::path & | path () const |
bool | ready () const |
void | rewind () |
void | seek (size_t offset) |
size_t | tell () |
Private Attributes | |
FILE * | file_ |
bfs::path | path_ |
Static Private Attributes | |
static const size_t | sizeof_value_size_t = Iterator::sizeof_value_size_t |
A class to read postlists from a binary file.
Created on Jun 22, 2008
Definition at line 26 of file PostlistReader.hpp.
typedef boost::shared_ptr<PostlistReader> aitools::invertedindex::PostlistReader::shared_pointer |
Definition at line 30 of file PostlistReader.hpp.
aitools::invertedindex::PostlistReader::PostlistReader | ( | ) |
The default constructor.
Definition at line 4 of file PostlistReader.cpp.
aitools::invertedindex::PostlistReader::PostlistReader | ( | const bfs::path & | path | ) | throw (std::invalid_argument) |
The explicit constructor.
Definition at line 8 of file PostlistReader.cpp.
aitools::invertedindex::PostlistReader::~PostlistReader | ( | ) |
The destructor.
Definition at line 15 of file PostlistReader.cpp.
void aitools::invertedindex::PostlistReader::close | ( | ) |
Definition at line 21 of file PostlistReader.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
bool aitools::invertedindex::PostlistReader::is_open | ( | ) | const [inline] |
Definition at line 57 of file PostlistReader.hpp.
References file_.
Referenced by ready().
void aitools::invertedindex::PostlistReader::open | ( | const bfs::path & | path | ) | throw (std::runtime_error, std::invalid_argument) |
Definition at line 32 of file PostlistReader.cpp.
const bfs::path & aitools::invertedindex::PostlistReader::path | ( | ) | const |
Definition at line 44 of file PostlistReader.cpp.
Iterator::SharedPointer aitools::invertedindex::PostlistReader::read | ( | size_t | length = INT_MAX |
) | throw (std::runtime_error) |
Definition at line 50 of file PostlistReader.cpp.
Referenced by read_postlist().
bool aitools::invertedindex::PostlistReader::ready | ( | ) | const [inline] |
Definition at line 70 of file PostlistReader.hpp.
References file_, and is_open().
void aitools::invertedindex::PostlistReader::rewind | ( | ) |
Definition at line 97 of file PostlistReader.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
void aitools::invertedindex::PostlistReader::seek | ( | size_t | offset | ) |
Definition at line 103 of file PostlistReader.cpp.
size_t aitools::invertedindex::PostlistReader::tell | ( | ) |
Definition at line 109 of file PostlistReader.cpp.
Referenced by read_postlist().
FILE* aitools::invertedindex::PostlistReader::file_ [private] |
Definition at line 83 of file PostlistReader.hpp.
bfs::path aitools::invertedindex::PostlistReader::path_ [private] |
Definition at line 84 of file PostlistReader.hpp.
const size_t aitools::invertedindex::PostlistReader::sizeof_value_size_t = Iterator::sizeof_value_size_t [static, private] |
Definition at line 34 of file PostlistReader.hpp.