MofileReader
|
Convenience Class. More...
#include <moFileReader.hpp>
Static Public Member Functions | |
static moFileReaderSingleton & | GetInstance () |
Singleton-Accessor. More... | |
Static Public Member Functions inherited from moFileReader | |
static eErrorCode | ExportAsHTML (const std::string &infile, const std::string &filename="", const std::string &css=g_css) |
Exports the whole content of the .mo-File as .html. More... | |
Additional Inherited Members | |
Public Types inherited from moFileReader | |
enum | eErrorCode { EC_SUCCESS = 0 , EC_ERROR , EC_FILENOTFOUND , EC_FILEINVALID , EC_TABLEEMPTY , EC_MAGICNUMBER_NOMATCH , EC_MAGICNUMBER_REVERSED } |
The possible errorcodes for methods of this class. More... | |
Public Member Functions inherited from moFileReader | |
moFileReader::eErrorCode | ParseData (const std::string &data) |
Reads a .mo-file. More... | |
eErrorCode | ReadFile (const char *filename) |
Reads a .mo-file. More... | |
template<typename T > | |
eErrorCode | ReadStream (T &stream) |
Reads data from a stream. More... | |
std::string | Lookup (const char *id) const |
Returns the searched translation or returns the input. More... | |
std::string | LookupWithContext (const char *context, const char *id) const |
Returns the searched translation or returns the input, restricted to the context given by context. See https://www.gnu.org/software/gettext/manual/html_node/Contexts.html for more info. More... | |
const std::string & | GetErrorDescription () const |
Returns the Error Description. More... | |
void | ClearTable () |
Empties the Lookup-Table. More... | |
unsigned int | GetNumStrings () const |
Returns the Number of Entries in our Lookup-Table. More... | |
Static Public Attributes inherited from moFileReader | |
static const unsigned int | MagicNumber = 0x950412DE |
The Magic Number describes the endianess of bytes on the system. More... | |
static const unsigned int | MagicReversed = 0xDE120495 |
If the Magic Number is Reversed, we need to swap the bytes. More... | |
static const char | ContextSeparator = '\x04' |
The character that is used to separate context strings. More... | |
Protected Types inherited from moFileReader | |
typedef std::map< std::string, std::string > | moLookupList |
Type for the map which holds the translation-pairs later. More... | |
typedef std::map< std::string, moLookupList > | moContextLookupList |
Type for the 2D map which holds the translation-pairs later. More... | |
Protected Member Functions inherited from moFileReader | |
unsigned long | SwapBytes (unsigned long in) |
Swap the endianness of a 4 byte WORD. More... | |
Protected Attributes inherited from moFileReader | |
std::string | m_error |
Keeps the last error as String. More... | |
Convenience Class.
This class derives from moFileReader and builds a singleton to access its methods in a global manner.
Definition at line 767 of file moFileReader.hpp.
|
inlinestatic |
Singleton-Accessor.
Definition at line 787 of file moFileReader.hpp.