Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Private Attributes | List of all members
orxonox::LanguageEntry Class Reference

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

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/Language.h>

Public Member Functions

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

Private Attributes

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

Detailed Description

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

This class belongs to the Language class.

Constructor & Destructor Documentation

orxonox::LanguageEntry::LanguageEntry ( const std::string &  fallbackEntry)
explicit

Constructor: Sets the default entry.

Parameters
fallbackEntryThe default entry

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
fallbackEntryThe default entry
void orxonox::LanguageEntry::setLabel ( const LanguageEntryLabel label)
inline

Sets the label of this entry.

Parameters
labelThe label
void orxonox::LanguageEntry::setLocalisation ( const std::string &  localisation)

Sets the localisation of the entry.

Parameters
localisationThe localisation

Member Data Documentation

bool orxonox::LanguageEntry::bLocalisationSet_
private

True if the translation was set.

std::string orxonox::LanguageEntry::fallbackEntry_
private

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

LanguageEntryLabel orxonox::LanguageEntry::label_
private

The label of the entry.

std::string orxonox::LanguageEntry::localisedEntry_
private

The localised entry in the configured language.


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