Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 28, 2007, 10:30:29 PM (16 years ago)
Author:
rgrieder
Message:
  • added Vector2, Vector3, Matrix3, ColourValue, Quaternion and String to the misc folder as header files (each of them contains #include <string> … typedef std::string String , etc.)
  • please use String from now on by including <misc/String.h"
  • removed #include <OgreVector3.h", etc. from "CoreIncludes.h" (adjusted all source files)
  • adjusted all the source files (except network, that keeps <string> for the moment) (what a mess..)
  • moved usleep hack to misc/Sleep.h
  • relative include paths for files from other root directories (like misc, network, etc.) (but it stills writes "../Orxonox.h" when in folder orxonox/objects)
  • "OgreSceneManager.h" —> <OgreSceneManager.h>
  • included OrxonoxPrereqs in every file in folder orxonox
  • moved HUD and ParticleInterface to namespace orxonox
  • removed some using namespace Ogre/std when appropriate
  • I hope I haven't forgotten important points..
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/core/Language.cc

    r704 r708  
    2828#include <fstream>
    2929
     30#include "CoreIncludes.h"
    3031#include "Language.h"
    31 #include "CoreIncludes.h"
    3232
    3333namespace orxonox
     
    3636    // ###      LanguageEntry      ###
    3737    // ###############################
    38     LanguageEntry::LanguageEntry(const std::string& fallbackEntry)
     38    LanguageEntry::LanguageEntry(const String& fallbackEntry)
    3939    {
    4040        RegisterRootObject(LanguageEntry);
     
    4444    }
    4545
    46     void LanguageEntry::setTranslation(const std::string& translation)
     46    void LanguageEntry::setTranslation(const String& translation)
    4747    {
    4848        if (translation.compare("") != 0)
     
    5252    }
    5353
    54     void LanguageEntry::setDefault(const std::string& fallbackEntry)
     54    void LanguageEntry::setDefault(const String& fallbackEntry)
    5555    {
    5656        if (this->translatedEntry_.compare(this->fallbackEntry_) == 0)
     
    8585    }
    8686
    87     void Language::createEntry(const LanguageEntryName& name, const std::string& entry)
     87    void Language::createEntry(const LanguageEntryName& name, const String& entry)
    8888    {
    8989        if (!this->languageEntries_[name])
     
    9999    }
    100100
    101     void Language::addEntry(const LanguageEntryName& name, const std::string& entry)
    102     {
    103         std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
     101    void Language::addEntry(const LanguageEntryName& name, const String& entry)
     102    {
     103        std::map<String, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
    104104        if (!it->second)
    105105            this->createEntry(name, entry);
     
    112112    }
    113113
    114     const std::string& Language::getTranslation(const LanguageEntryName& name) const
    115     {
    116         std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
     114    const String& Language::getTranslation(const LanguageEntryName& name) const
     115    {
     116        std::map<String, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
    117117        if (it->second)
    118118            return it->second->getTranslation();
     
    124124    }
    125125
    126     const std::string Language::getFileName(const std::string& language)
    127     {
    128         return std::string("translation_" + language + ".lang");
     126    const String Language::getFileName(const String& language)
     127    {
     128        return String("translation_" + language + ".lang");
    129129    }
    130130
     
    154154        {
    155155            file.getline(line, 1024);
    156             std::string lineString = std::string(line);
     156            String lineString = String(line);
    157157            if (lineString.compare("") != 0)
    158158            {
     
    190190        {
    191191            file.getline(line, 1024);
    192             std::string lineString = std::string(line);
     192            String lineString = String(line);
    193193            if (lineString.compare("") != 0)
    194194            {
     
    196196                if (pos < lineString.size() && lineString.size() >= 3)
    197197                {
    198                     std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(lineString.substr(0, pos));
     198                    std::map<String, LanguageEntry*>::const_iterator it = this->languageEntries_.find(lineString.substr(0, pos));
    199199                    if (it->second)
    200200                        it->second->setTranslation(lineString.substr(pos + 1));
Note: See TracChangeset for help on using the changeset viewer.