MofileReader
moFileReader.hpp File Reference
#include <cstring>
#include <deque>
#include <fstream>
#include <map>
#include <sstream>
#include <string>
+ Include dependency graph for moFileReader.hpp:

Go to the source code of this file.

Classes

struct  moTranslationPairInformation
 Keeps the Description of translated and original strings. More...
 
struct  moFileInfo
 Describes the "Header" of a .mo-File. More...
 
class  moFileReader
 This class is a gettext-replacement. More...
 
class  moFileReaderSingleton
 Convenience Class. More...
 

Namespaces

 moFileLib
 This is the only namespace of this small sourcecode.
 

Macros

#define MO_PATHSEP   std::string("/")
 
#define MO_BEGIN_NAMESPACE
 
#define MO_END_NAMESPACE   }
 

Functions

moFileReader::eErrorCode moReadMoFile (const char *_filename)
 Reads the .mo-File. More...
 
std::string _ (const char *id)
 Looks for the spec. string to translate. More...
 
void moFileClearTable ()
 Resets the Lookup-Table. More...
 
std::string moFileGetErrorDescription ()
 Returns the last known error as string or an empty class. More...
 
int moFileGetNumStrings ()
 Returns the number of entries loaded from the .mo-File. More...
 

Variables

MO_BEGIN_NAMESPACE const std::string g_css
 

Macro Definition Documentation

◆ MO_BEGIN_NAMESPACE

#define MO_BEGIN_NAMESPACE
Value:
namespace moFileLib \
{
This is the only namespace of this small sourcecode.

Definition at line 63 of file moFileReader.hpp.

◆ MO_END_NAMESPACE

#define MO_END_NAMESPACE   }

Definition at line 71 of file moFileReader.hpp.

◆ MO_PATHSEP

#define MO_PATHSEP   std::string("/")

Definition at line 55 of file moFileReader.hpp.

Function Documentation

◆ _()

std::string _ ( const char *  id)
inline

Looks for the spec. string to translate.

Parameters
[in]idThe string-id to search.
Returns
The translation if found, otherwise it returns id.

Definition at line 808 of file moFileReader.hpp.

◆ moFileClearTable()

void moFileClearTable ( )
inline

Resets the Lookup-Table.

Definition at line 815 of file moFileReader.hpp.

◆ moFileGetErrorDescription()

std::string moFileGetErrorDescription ( )
inline

Returns the last known error as string or an empty class.

Definition at line 821 of file moFileReader.hpp.

◆ moFileGetNumStrings()

int moFileGetNumStrings ( )
inline

Returns the number of entries loaded from the .mo-File.

Definition at line 828 of file moFileReader.hpp.

◆ moReadMoFile()

moFileReader::eErrorCode moReadMoFile ( const char *  _filename)
inline

Reads the .mo-File.

Parameters
[in]_filenameThe path to the file to use.
See also
moFileReader::ReadFile() for details.

Definition at line 798 of file moFileReader.hpp.

Variable Documentation

◆ g_css

MO_BEGIN_NAMESPACE const std::string g_css
Initial value:
= R"(
body {
background-color: black;
color: silver;
}
table {
width: 80%;
}
th {
background-color: orange;
color: black;
}
hr {
color: red;
width: 80%;
size: 5px;
}
a:link{
color: gold;
}
a:visited{
color: grey;
}
a:hover{
color:blue;
}
.copyleft{
font-size: 12px;
text-align: center;
})"

Definition at line 164 of file moFileReader.hpp.