Changeset 715 for code/branches/FICN/src/orxonox/core/Language.h
- Timestamp:
- Dec 28, 2007, 11:33:10 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/core/Language.h
r708 r715 30 30 31 31 #include <map> 32 #include <string> 32 33 33 34 #include "CorePrereqs.h" 34 35 35 #include "misc/String.h"36 36 #include "OrxonoxClass.h" 37 37 38 38 namespace orxonox 39 39 { 40 typedef String LanguageEntryName;40 typedef std::string LanguageEntryName; 41 41 42 42 class _CoreExport LanguageEntry : public OrxonoxClass 43 43 { 44 44 public: 45 explicit LanguageEntry(const String& fallbackEntry);46 void setTranslation(const String& translation);47 void setDefault(const String& fallbackEntry);45 explicit LanguageEntry(const std::string& fallbackEntry); 46 void setTranslation(const std::string& translation); 47 void setDefault(const std::string& fallbackEntry); 48 48 49 inline const String& getTranslation()49 inline const std::string& getTranslation() 50 50 { return this->translatedEntry_; } 51 51 52 inline const String& getDefault()52 inline const std::string& getDefault() 53 53 { return this->fallbackEntry_; } 54 54 55 55 private: 56 String fallbackEntry_;57 String translatedEntry_;56 std::string fallbackEntry_; 57 std::string translatedEntry_; 58 58 }; 59 59 … … 63 63 static Language& getLanguage(); 64 64 void setConfigValues(); 65 void addEntry(const LanguageEntryName& name, const String& entry);66 const String& getTranslation(const LanguageEntryName& name) const;65 void addEntry(const LanguageEntryName& name, const std::string& entry); 66 const std::string& getTranslation(const LanguageEntryName& name) const; 67 67 68 68 private: … … 74 74 void readTranslatedLanguageFile(); 75 75 void writeDefaultLanguageFile() const; 76 static const String getFileName(const String& language);77 void createEntry(const LanguageEntryName& name, const String& entry);76 static const std::string getFileName(const std::string& language); 77 void createEntry(const LanguageEntryName& name, const std::string& entry); 78 78 79 String language_;80 String defaultLanguage_;81 String defaultTranslation_;82 std::map< String, LanguageEntry*> languageEntries_;79 std::string language_; 80 std::string defaultLanguage_; 81 std::string defaultTranslation_; 82 std::map<std::string, LanguageEntry*> languageEntries_; 83 83 }; 84 84 }
Note: See TracChangeset
for help on using the changeset viewer.