#include <StringString.hpp>
Public Member Functions | |
StringString () | |
StringString (const std::string &e1, const std::string &e2) | |
StringString (const StringString &pair) | |
virtual | ~StringString () |
void | clear () |
bool | operator== (const StringString &pair) const |
bool | operator!= (const StringString &pair) const |
bool | operator> (const StringString &pair) const |
bool | operator< (const StringString &pair) const |
void | parse (std::istream &is) |
void | print (std::ostream &os) const |
double | score () const |
std::string & | e1 () |
const std::string & | e1 () const |
std::string & | e2 () |
const std::string & | e2 () const |
void | to_bytes (ByteBuffer &buffer) const |
void | wrap (const char *data, size_t size) |
void | wrap (const ByteBuffer &buffer) |
Static Public Attributes | |
static const std::string | classname |
Private Types | |
typedef uint16_t | string_size |
Private Attributes | |
std::string | e1_ |
std::string | e2_ |
string_size | len_ |
Static Private Attributes | |
static const size_t | sizeof_string_size = sizeof(string_size) |
A concrete class of Value. This class interprets its ByteBuffer as two strings.
Definition at line 20 of file StringString.hpp.
typedef uint16_t aitools::invertedindex::StringString::string_size [private] |
Definition at line 24 of file StringString.hpp.
aitools::invertedindex::StringString::StringString | ( | ) |
aitools::invertedindex::StringString::StringString | ( | const std::string & | e1, | |
const std::string & | e2 | |||
) |
The explicit constructor.
Definition at line 12 of file StringString.cpp.
aitools::invertedindex::StringString::StringString | ( | const StringString & | pair | ) |
The copy constructor.
Definition at line 18 of file StringString.cpp.
aitools::invertedindex::StringString::~StringString | ( | ) | [virtual] |
The destructor.
Definition at line 24 of file StringString.cpp.
void aitools::invertedindex::StringString::clear | ( | ) | [virtual] |
Resets all internals to default values.
Implements aitools::invertedindex::Value.
Definition at line 28 of file StringString.cpp.
const std::string & aitools::invertedindex::StringString::e1 | ( | ) | const |
Definition at line 83 of file StringString.cpp.
References e1_.
std::string & aitools::invertedindex::StringString::e1 | ( | ) |
Definition at line 77 of file StringString.cpp.
References e1_.
const std::string & aitools::invertedindex::StringString::e2 | ( | ) | const |
Definition at line 95 of file StringString.cpp.
References e2_.
std::string & aitools::invertedindex::StringString::e2 | ( | ) |
Definition at line 89 of file StringString.cpp.
References e1_.
bool aitools::invertedindex::StringString::operator!= | ( | const StringString & | pair | ) | const |
Definition at line 41 of file StringString.cpp.
bool aitools::invertedindex::StringString::operator< | ( | const StringString & | pair | ) | const |
Definition at line 53 of file StringString.cpp.
References score().
bool aitools::invertedindex::StringString::operator== | ( | const StringString & | pair | ) | const |
Definition at line 35 of file StringString.cpp.
bool aitools::invertedindex::StringString::operator> | ( | const StringString & | pair | ) | const |
Definition at line 47 of file StringString.cpp.
void aitools::invertedindex::StringString::parse | ( | std::istream & | is | ) | [virtual] |
Parses all elements from an input stream.
Implements aitools::invertedindex::Value.
Definition at line 59 of file StringString.cpp.
References score().
void aitools::invertedindex::StringString::print | ( | std::ostream & | os | ) | const [virtual] |
Prints all elements to an output stream.
Implements aitools::invertedindex::Value.
Definition at line 65 of file StringString.cpp.
double aitools::invertedindex::StringString::score | ( | ) | const [virtual] |
Gets the weight of this object.
Implements aitools::invertedindex::Value.
Definition at line 71 of file StringString.cpp.
Referenced by operator<(), and parse().
void aitools::invertedindex::StringString::to_bytes | ( | ByteBuffer & | buffer | ) | const [virtual] |
Serializes all elements into a byte buffer.
Implements aitools::invertedindex::Value.
Definition at line 101 of file StringString.cpp.
References e2_.
void aitools::invertedindex::StringString::wrap | ( | const ByteBuffer & | buffer | ) |
Interprets a byte buffer.
Reimplemented from aitools::invertedindex::Value.
Definition at line 125 of file StringString.cpp.
void aitools::invertedindex::StringString::wrap | ( | const char * | data, | |
size_t | size | |||
) | [virtual] |
Interprets a byte buffer.
Implements aitools::invertedindex::Value.
Definition at line 114 of file StringString.cpp.
const std::string aitools::invertedindex::StringString::classname [static] |
Definition at line 28 of file StringString.hpp.
Referenced by StringString().
std::string aitools::invertedindex::StringString::e1_ [private] |
Definition at line 90 of file StringString.hpp.
Referenced by e1(), e2(), operator!=(), print(), and score().
std::string aitools::invertedindex::StringString::e2_ [private] |
Definition at line 91 of file StringString.hpp.
Referenced by e2(), operator!=(), print(), score(), and to_bytes().
Definition at line 92 of file StringString.hpp.
const size_t aitools::invertedindex::StringString::sizeof_string_size = sizeof(string_size) [static, private] |
Definition at line 32 of file StringString.hpp.