#include <InvertedFileWriter.hpp>
Public Member Functions | |
InvertedFileWriter () | |
InvertedFileWriter (const bfs::path &path) throw (std::invalid_argument) | |
~InvertedFileWriter () | |
void | close () |
bool | is_open () const |
const bfs::path & | path () const |
void | open (const bfs::path &path) throw (std::invalid_argument) |
bool | write (const Record< Value > &record) |
Static Public Attributes | |
static const char | delim = '\t' |
Private Member Functions | |
InvertedFileWriter (const InvertedFileWriter &writer) | |
InvertedFileWriter & | operator= (const InvertedFileWriter &writer) |
Private Attributes | |
bfs::ofstream | ofs_ |
std::string | key_ |
bfs::path | path_ |
A class to write key value pairs in the correct format of an inverted file.
Created on Jun 22, 2008
Definition at line 24 of file InvertedFileWriter.hpp.
aitools::invertedindex::InvertedFileWriter< Value >::InvertedFileWriter | ( | ) | [inline] |
Definition at line 67 of file InvertedFileWriter.hpp.
aitools::invertedindex::InvertedFileWriter< Value >::InvertedFileWriter | ( | const bfs::path & | path | ) | throw (std::invalid_argument) [inline] |
Definition at line 71 of file InvertedFileWriter.hpp.
aitools::invertedindex::InvertedFileWriter< Value >::~InvertedFileWriter | ( | ) | [inline] |
Definition at line 78 of file InvertedFileWriter.hpp.
aitools::invertedindex::InvertedFileWriter< Value >::InvertedFileWriter | ( | const InvertedFileWriter< Value > & | writer | ) | [private] |
void aitools::invertedindex::InvertedFileWriter< Value >::close | ( | ) | [inline] |
Definition at line 83 of file InvertedFileWriter.hpp.
References aitools::invertedindex::InvertedFileWriter< Value >::key_, aitools::invertedindex::InvertedFileWriter< Value >::ofs_, aitools::invertedindex::InvertedFileWriter< Value >::path(), and aitools::invertedindex::InvertedFileWriter< Value >::path_.
Referenced by BOOST_AUTO_TEST_CASE().
bool aitools::invertedindex::InvertedFileWriter< Value >::is_open | ( | ) | const [inline] |
Definition at line 92 of file InvertedFileWriter.hpp.
References aitools::invertedindex::InvertedFileWriter< Value >::ofs_.
void aitools::invertedindex::InvertedFileWriter< Value >::open | ( | const bfs::path & | path | ) | throw (std::invalid_argument) [inline] |
Definition at line 106 of file InvertedFileWriter.hpp.
References aitools::invertedindex::Exception::throw_invalid_argument().
InvertedFileWriter& aitools::invertedindex::InvertedFileWriter< Value >::operator= | ( | const InvertedFileWriter< Value > & | writer | ) | [private] |
const bfs::path & aitools::invertedindex::InvertedFileWriter< Value >::path | ( | ) | const [inline] |
Definition at line 99 of file InvertedFileWriter.hpp.
References aitools::invertedindex::InvertedFileWriter< Value >::path_.
Referenced by aitools::invertedindex::InvertedFileWriter< Value >::close().
bool aitools::invertedindex::InvertedFileWriter< Value >::write | ( | const Record< Value > & | record | ) | [inline] |
Definition at line 119 of file InvertedFileWriter.hpp.
References aitools::invertedindex::Record< Value >::key(), aitools::invertedindex::InvertedFileWriter< Value >::key_, aitools::invertedindex::InvertedFileWriter< Value >::ofs_, and aitools::invertedindex::Record< Value >::value().
Referenced by BOOST_AUTO_TEST_CASE().
const char aitools::invertedindex::InvertedFileWriter< Value >::delim = '\t' [static] |
Definition at line 28 of file InvertedFileWriter.hpp.
std::string aitools::invertedindex::InvertedFileWriter< Value >::key_ [private] |
Definition at line 59 of file InvertedFileWriter.hpp.
Referenced by aitools::invertedindex::InvertedFileWriter< Value >::close(), and aitools::invertedindex::InvertedFileWriter< Value >::write().
bfs::ofstream aitools::invertedindex::InvertedFileWriter< Value >::ofs_ [private] |
Definition at line 58 of file InvertedFileWriter.hpp.
Referenced by aitools::invertedindex::InvertedFileWriter< Value >::close(), aitools::invertedindex::InvertedFileWriter< Value >::is_open(), and aitools::invertedindex::InvertedFileWriter< Value >::write().
bfs::path aitools::invertedindex::InvertedFileWriter< Value >::path_ [private] |
Definition at line 60 of file InvertedFileWriter.hpp.
Referenced by aitools::invertedindex::InvertedFileWriter< Value >::close(), and aitools::invertedindex::InvertedFileWriter< Value >::path().