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.h

    r704 r708  
    2929#define _Language_H__
    3030
    31 #include <string>
    3231#include <map>
    3332
    3433#include "CorePrereqs.h"
    3534
     35#include "misc/String.h"
    3636#include "OrxonoxClass.h"
    3737
    3838namespace orxonox
    3939{
    40     typedef std::string LanguageEntryName;
     40    typedef String LanguageEntryName;
    4141
    4242    class _CoreExport LanguageEntry : public OrxonoxClass
    4343    {
    4444        public:
    45             explicit LanguageEntry(const std::string& fallbackEntry);
    46             void setTranslation(const std::string& translation);
    47             void setDefault(const std::string& fallbackEntry);
     45            explicit LanguageEntry(const String& fallbackEntry);
     46            void setTranslation(const String& translation);
     47            void setDefault(const String& fallbackEntry);
    4848
    49             inline const std::string& getTranslation()
     49            inline const String& getTranslation()
    5050                { return this->translatedEntry_; }
    5151
    52             inline const std::string& getDefault()
     52            inline const String& getDefault()
    5353                { return this->fallbackEntry_; }
    5454
    5555        private:
    56             std::string fallbackEntry_;
    57             std::string translatedEntry_;
     56            String fallbackEntry_;
     57            String translatedEntry_;
    5858    };
    5959
     
    6363            static Language& getLanguage();
    6464            void setConfigValues();
    65             void addEntry(const LanguageEntryName& name, const std::string& entry);
    66             const std::string& getTranslation(const LanguageEntryName& name) const;
     65            void addEntry(const LanguageEntryName& name, const String& entry);
     66            const String& getTranslation(const LanguageEntryName& name) const;
    6767
    6868        private:
     
    7474            void readTranslatedLanguageFile();
    7575            void writeDefaultLanguageFile() const;
    76             static const std::string getFileName(const std::string& language);
    77             void createEntry(const LanguageEntryName& name, const std::string& entry);
     76            static const String getFileName(const String& language);
     77            void createEntry(const LanguageEntryName& name, const String& entry);
    7878
    79             std::string language_;
    80             std::string defaultLanguage_;
    81             std::string defaultTranslation_;
    82             std::map<std::string, LanguageEntry*> languageEntries_;
     79            String language_;
     80            String defaultLanguage_;
     81            String defaultTranslation_;
     82            std::map<String, LanguageEntry*> languageEntries_;
    8383    };
    8484}
Note: See TracChangeset for help on using the changeset viewer.