Orxonox: orxonox::LanguageEntry Class Reference

# orxonox::LanguageEntry Class Reference

The LanguageEntry class stores the default- and the translated string of a given entry in the language file. More...

`#include <src/core/Language.h>`

List of all members.

## Public Member Functions

const std::string & | getDefault ()
| Returns the default entry.
const LanguageEntryLabel & | getLabel () const
| Returns the label of this entry.
const std::string & | getLocalisation ()
| Returns the localised entry in the configured language.
| LanguageEntry (const std::string &fallbackEntry)
| Constructor: Sets the default entry.
void | setDefault (const std::string &fallbackEntry)
| Sets the default entry.
void | setLabel (const LanguageEntryLabel &label)
| Sets the label of this entry.
void | setLocalisation (const std::string &localisation)
| Sets the localisation of the entry.

## Private Attributes

bool | bLocalisationSet_
| True if the translation was set.
std::string | fallbackEntry_
| The default entry: Used, if no translation is available or no language configured.
LanguageEntryLabel | label_
| The label of the entry.
std::string | localisedEntry_
| The localised entry in the configured language.

## Detailed Description

The LanguageEntry class stores the default- and the translated string of a given entry in the language file.

## Constructor & Destructor Documentation

orxonox::LanguageEntry::LanguageEntry | ( | const std::string & | fallbackEntry | ) | `[explicit]`

Constructor: Sets the default entry.

Parameters:

  | fallbackEntry | The default entry

References bLocalisationSet_, fallbackEntry_, and localisedEntry_.

## Member Function Documentation

const std::string& orxonox::LanguageEntry::getDefault | ( |  | ) | `[inline]`

Returns the default entry.

Returns:
  The default entry

const LanguageEntryLabel& orxonox::LanguageEntry::getLabel | ( |  | ) | const`[inline]`

Returns the label of this entry.

Returns:
  The label

const std::string& orxonox::LanguageEntry::getLocalisation | ( |  | ) | `[inline]`

Returns the localised entry in the configured language.

Returns:
  The translated entry

void orxonox::LanguageEntry::setDefault | ( | const std::string & | fallbackEntry | ) |

Sets the default entry.

Parameters:

  | fallbackEntry | The default entry

References bLocalisationSet_, fallbackEntry_, and localisedEntry_.

void orxonox::LanguageEntry::setLabel | ( | const LanguageEntryLabel & | label | ) | `[inline]`

Sets the label of this entry.

Parameters:

  | label | The label

Referenced by orxonox::Language::createEntry().

void orxonox::LanguageEntry::setLocalisation | ( | const std::string & | localisation | ) |

Sets the localisation of the entry.

Parameters:

  | localisation | The localisation

References bLocalisationSet_, fallbackEntry_, and localisedEntry_.

## Member Data Documentation

bool orxonox::LanguageEntry::bLocalisationSet_`[private]`

True if the translation was set.

Referenced by LanguageEntry(), setDefault(), and setLocalisation().

std::string orxonox::LanguageEntry::fallbackEntry_`[private]`

The default entry: Used, if no translation is available or no language configured.

Referenced by LanguageEntry(), setDefault(), and setLocalisation().

LanguageEntryLabel orxonox::LanguageEntry::label_`[private]`

The label of the entry.

std::string orxonox::LanguageEntry::localisedEntry_`[private]`

The localised entry in the configured language.

Referenced by LanguageEntry(), setDefault(), and setLocalisation().

The documentation for this class was generated from the following files:

- src/core/Language.h
- src/core/Language.cc