#include <Record.hpp>
Public Member Functions | |
Record () | |
Record (const std::string &key, const Value &value) | |
Record (const Record< Value > &record) | |
~Record () | |
std::string & | key () |
const std::string & | key () const |
bool | operator== (const Record< Value > &record) const |
bool | operator!= (const Record< Value > &record) const |
Record< Value > & | operator= (const Record< Value > &record) |
void | parse (std::istream &is) |
void | print (std::ostream &os) const |
void | to_generic (GenericRecord &record) const |
Value & | value () |
const Value & | value () const |
Static Public Attributes | |
static const std::string | empty_key |
static const char | separator = '\t' |
Private Attributes | |
std::string | key_ |
Value | value_ |
A class template to represent a key value pair.
Created on Jun 22, 2008
Definition at line 22 of file Record.hpp.
aitools::invertedindex::Record< Value >::Record | ( | ) | [inline] |
Definition at line 75 of file Record.hpp.
aitools::invertedindex::Record< Value >::Record | ( | const std::string & | key, | |
const Value & | value | |||
) | [inline] |
Definition at line 79 of file Record.hpp.
aitools::invertedindex::Record< Value >::Record | ( | const Record< Value > & | record | ) | [inline] |
Definition at line 85 of file Record.hpp.
aitools::invertedindex::Record< Value >::~Record | ( | ) | [inline] |
Definition at line 91 of file Record.hpp.
const std::string & aitools::invertedindex::Record< Value >::key | ( | ) | const [inline] |
Definition at line 103 of file Record.hpp.
References aitools::invertedindex::Record< Value >::key_.
std::string & aitools::invertedindex::Record< Value >::key | ( | ) | [inline] |
Definition at line 96 of file Record.hpp.
References aitools::invertedindex::Record< Value >::key_.
Referenced by BOOST_AUTO_TEST_CASE(), aitools::invertedindex::NGramFileReader::next(), and aitools::invertedindex::InvertedFileWriter< Value >::write().
bool aitools::invertedindex::Record< Value >::operator!= | ( | const Record< Value > & | record | ) | const [inline] |
Definition at line 117 of file Record.hpp.
Record< Value > & aitools::invertedindex::Record< Value >::operator= | ( | const Record< Value > & | record | ) | [inline] |
Definition at line 124 of file Record.hpp.
References aitools::invertedindex::Record< Value >::key_, and aitools::invertedindex::Record< Value >::value_.
bool aitools::invertedindex::Record< Value >::operator== | ( | const Record< Value > & | record | ) | const [inline] |
Definition at line 110 of file Record.hpp.
References aitools::invertedindex::Record< Value >::key_, and aitools::invertedindex::Record< Value >::value_.
void aitools::invertedindex::Record< Value >::parse | ( | std::istream & | is | ) | [inline] |
Definition at line 133 of file Record.hpp.
References aitools::invertedindex::Record< Value >::key_, and aitools::invertedindex::Record< Value >::value_.
Referenced by std::operator>>().
void aitools::invertedindex::Record< Value >::print | ( | std::ostream & | os | ) | const [inline] |
Definition at line 140 of file Record.hpp.
References aitools::invertedindex::Record< Value >::empty_key, aitools::invertedindex::Record< Value >::key_, aitools::invertedindex::Record< Value >::separator, and aitools::invertedindex::Record< Value >::value_.
void aitools::invertedindex::Record< Value >::to_generic | ( | GenericRecord< Value > & | record | ) | const [inline] |
Definition at line 147 of file Record.hpp.
References aitools::invertedindex::GenericRecord::key(), aitools::invertedindex::Record< Value >::key_, aitools::invertedindex::Value::to_bytes(), aitools::invertedindex::GenericRecord::value(), and aitools::invertedindex::Record< Value >::value_.
Referenced by BOOST_AUTO_TEST_CASE().
const Value & aitools::invertedindex::Record< Value >::value | ( | ) | const [inline] |
Definition at line 162 of file Record.hpp.
References aitools::invertedindex::Record< Value >::value_.
Value & aitools::invertedindex::Record< Value >::value | ( | ) | [inline] |
Definition at line 155 of file Record.hpp.
References aitools::invertedindex::Record< Value >::value_.
Referenced by BOOST_AUTO_TEST_CASE(), aitools::invertedindex::NGramFileReader::next(), and aitools::invertedindex::InvertedFileWriter< Value >::write().
const std::string aitools::invertedindex::Record< Value >::empty_key [inline, static] |
Definition at line 26 of file Record.hpp.
Referenced by aitools::invertedindex::Record< Value >::print().
std::string aitools::invertedindex::Record< Value >::key_ [private] |
Definition at line 63 of file Record.hpp.
Referenced by aitools::invertedindex::Record< Value >::key(), aitools::invertedindex::Record< Value >::operator=(), aitools::invertedindex::Record< Value >::operator==(), aitools::invertedindex::Record< Value >::parse(), aitools::invertedindex::Record< Value >::print(), and aitools::invertedindex::Record< Value >::to_generic().
const char aitools::invertedindex::Record< Value >::separator = '\t' [static] |
Definition at line 27 of file Record.hpp.
Referenced by aitools::invertedindex::Record< Value >::print().
Value aitools::invertedindex::Record< Value >::value_ [private] |
Definition at line 64 of file Record.hpp.
Referenced by aitools::invertedindex::Record< Value >::operator=(), aitools::invertedindex::Record< Value >::operator==(), aitools::invertedindex::Record< Value >::parse(), aitools::invertedindex::Record< Value >::print(), aitools::invertedindex::Record< Value >::to_generic(), and aitools::invertedindex::Record< Value >::value().