#include <Converter.hpp>
Static Public Member Functions | |
static uint32_t | str_to_ui32 (const std::string &str) |
static uint64_t | str_to_ui64 (const std::string &str) |
static std::string | ui32_to_str (uint32_t number) |
static std::string | ui64_to_str (uint64_t number) |
static std::string | float_to_str (float number) |
static std::string | double_to_str (double number) |
template<typename T > | |
static std::string | nameof () |
Private Member Functions | |
Converter () | |
~Converter () |
A helper class to convert integer to string and vice versa.
Created on Jun 22, 2008
Definition at line 23 of file Converter.hpp.
aitools::invertedindex::Converter::Converter | ( | ) | [private] |
The default constructor.
aitools::invertedindex::Converter::~Converter | ( | ) | [private] |
The destructor.
std::string aitools::invertedindex::Converter::double_to_str | ( | double | number | ) | [static] |
Definition at line 63 of file Converter.cpp.
std::string aitools::invertedindex::Converter::float_to_str | ( | float | number | ) | [static] |
Definition at line 51 of file Converter.cpp.
std::string aitools::invertedindex::Converter::nameof | ( | ) | [inline, static] |
Definition at line 80 of file Converter.hpp.
uint32_t aitools::invertedindex::Converter::str_to_ui32 | ( | const std::string & | str | ) | [static] |
A method to convert a string to an unsigned integer of 4 byte.
str | a string to be converted. |
Definition at line 5 of file Converter.cpp.
uint64_t aitools::invertedindex::Converter::str_to_ui64 | ( | const std::string & | str | ) | [static] |
A method to convert a string to an unsigned integer of 8 byte.
str | a string to be converted. |
Definition at line 16 of file Converter.cpp.
std::string aitools::invertedindex::Converter::ui32_to_str | ( | uint32_t | number | ) | [static] |
A method to convert an unsigned integer of 4 byte to a string representation.
ui64 | an 4 byte unsigned integer to be converted. |
Definition at line 27 of file Converter.cpp.
Referenced by aitools::invertedindex::StorageSearcher::open(), and aitools::invertedindex::StorageBuilder::put().
std::string aitools::invertedindex::Converter::ui64_to_str | ( | uint64_t | number | ) | [static] |
A method to convert an unsigned integer of 8 byte to a string representation.
ui64 | an 8 byte unsigned integer to be converted. |
Definition at line 39 of file Converter.cpp.