Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 715


Ignore:
Timestamp:
Dec 28, 2007, 11:33:10 PM (16 years ago)
Author:
rgrieder
Message:
  • the master has spoken…
  • misc/String.h is not anymore..
Location:
code/branches/FICN
Files:
1 deleted
52 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/audio/AudioBuffer.cc

    r708 r715  
    3030namespace audio
    3131{
    32         AudioBuffer::AudioBuffer(orxonox::String fileName)
     32        AudioBuffer::AudioBuffer(std::string fileName)
    3333        {
    3434                // Load wav data into buffers.
  • code/branches/FICN/src/audio/AudioBuffer.h

    r708 r715  
    99        {
    1010        public:
    11                 AudioBuffer(orxonox::String fileName);
     11                AudioBuffer(std::string fileName);
    1212                ~AudioBuffer();
    1313        private:
     
    1515                ALuint buffer;
    1616                // Identifier
    17                 orxonox::String name;
     17                std::string name;
    1818                // True if AL was able to load data
    1919                ALboolean loaded;
  • code/branches/FICN/src/audio/AudioIncludes.h

    r708 r715  
    11#include <iostream>
    22#include <vector>
     3#include <string>
    34
    45#include <AL/al.h>
     
    1112
    1213#include "orxonox/core/Error.h"
    13 #include "misc/String.h"
  • code/branches/FICN/src/audio/AudioManager.cc

    r708 r715  
    7272        }
    7373
    74         void AudioManager::ambientAdd(orxonox::String file)
     74        void AudioManager::ambientAdd(std::string file)
    7575        {
    76     orxonox::String path = ambientPath + "/" + file + ".ogg";
     76    std::string path = ambientPath + "/" + file + ".ogg";
    7777                AudioStream tmp(path);
    7878                tmp.open();
  • code/branches/FICN/src/audio/AudioManager.h

    r708 r715  
    3737                void update();
    3838
    39                 void ambientAdd(orxonox::String file);
     39                void ambientAdd(std::string file);
    4040                void ambientStart();
    4141                void ambientStop();
     
    4949
    5050
    51                 orxonox::String ambientPath;
     51                std::string ambientPath;
    5252       
    5353                // Vector containing all audio files
  • code/branches/FICN/src/audio/AudioStream.cc

    r712 r715  
    2626 */
    2727
     28#include <string>
    2829
    2930#include "AudioStream.h"
    30 #include "misc/String.h"
    3131#include "../orxonox/core/Debug.h"
    3232
    3333namespace audio
    3434{
    35   AudioStream::AudioStream(orxonox::String path)
     35  AudioStream::AudioStream(std::string path)
    3636        {
    3737                this->path = path;
     
    255255
    256256
    257         orxonox::String AudioStream::errorString(int code)
     257        std::string AudioStream::errorString(int code)
    258258        {
    259259            switch(code)
    260260            {
    261261                case OV_EREAD:
    262                     return orxonox::String("Read from media.");
     262                    return std::string("Read from media.");
    263263                case OV_ENOTVORBIS:
    264                     return orxonox::String("Not Vorbis data.");
     264                    return std::string("Not Vorbis data.");
    265265                case OV_EVERSION:
    266                     return orxonox::String("Vorbis version mismatch.");
     266                    return std::string("Vorbis version mismatch.");
    267267                case OV_EBADHEADER:
    268                     return orxonox::String("Invalid Vorbis header.");
     268                    return std::string("Invalid Vorbis header.");
    269269                case OV_EFAULT:
    270                     return orxonox::String("Internal logic fault (bug or heap/stack corruption.");
     270                    return std::string("Internal logic fault (bug or heap/stack corruption.");
    271271                default:
    272                     return orxonox::String("Unknown Ogg error.");
     272                    return std::string("Unknown Ogg error.");
    273273            }
    274274        }
  • code/branches/FICN/src/audio/AudioStream.h

    r708 r715  
    1111  {
    1212    public:
    13       AudioStream(orxonox::String path);
     13      AudioStream(std::string path);
    1414      void open();
    1515      void release();
     
    2424      void empty();
    2525      void check();
    26       orxonox::String errorString(int code);
     26      std::string errorString(int code);
    2727
    2828    private:
    29       orxonox::String path;
     29      std::string path;
    3030
    3131      FILE*           oggFile;
  • code/branches/FICN/src/loader/LevelLoader.cc

    r708 r715  
    4242{
    4343
    44   LevelLoader::LevelLoader(orxonox::String file, orxonox::String path)
     44  LevelLoader::LevelLoader(std::string file, std::string path)
    4545  {
    4646    valid_ = false;
     
    155155
    156156              tElem = tNode->ToElement();
    157               orxonox::String elemVal = tElem->Value();
     157              std::string elemVal = tElem->Value();
    158158              if (elemVal == "ogg")
    159159              {
  • code/branches/FICN/src/loader/LevelLoader.h

    r708 r715  
    99#define _LevelLoader_H__
    1010
     11#include <string>
     12
    1113#include "LoaderPrereqs.h"
    12 
    13 #include "misc/String.h"
    1414#include "tinyxml/tinyxml.h"
    1515
     
    2323  public:
    2424    // Constructors, loads the level file and some information data
    25     LevelLoader(orxonox::String file, orxonox::String dir = "levels");
     25    LevelLoader(std::string file, std::string dir = "levels");
    2626    // Destructor
    2727    virtual ~LevelLoader();
     
    3030
    3131    // Getters
    32     inline orxonox::String name() {return name_; };
    33     inline orxonox::String description() {return description_; };
    34     inline orxonox::String image() {return image_; };
     32    inline std::string name() {return name_; };
     33    inline std::string description() {return description_; };
     34    inline std::string image() {return image_; };
    3535  private:
    3636    //! Level information
    37     orxonox::String name_;
    38     orxonox::String description_;
    39     orxonox::String image_;
    40     orxonox::String loadingBackgroundColor_;
    41     orxonox::String loadingBackgroundImage_;
    42     orxonox::String loadingBarImage_;
    43     orxonox::String loadingBarTop_;
    44     orxonox::String loadingBarLeft_;
    45     orxonox::String loadingBarWidth_;
    46     orxonox::String loadingBarHeight_;
     37    std::string name_;
     38    std::string description_;
     39    std::string image_;
     40    std::string loadingBackgroundColor_;
     41    std::string loadingBackgroundImage_;
     42    std::string loadingBarImage_;
     43    std::string loadingBarTop_;
     44    std::string loadingBarLeft_;
     45    std::string loadingBarWidth_;
     46    std::string loadingBarHeight_;
    4747
    4848    //! Set to true if it was possible to load the level file
  • code/branches/FICN/src/orxonox/GraphicsEngine.cc

    r708 r715  
    6565#endif*/
    6666#if defined(_DEBUG) && defined(WIN32)
    67     String plugin_filename = "plugins_d.cfg";
     67    std::string plugin_filename = "plugins_d.cfg";
    6868#else
    69     String plugin_filename = "plugins.cfg";
     69    std::string plugin_filename = "plugins.cfg";
    7070#endif
    7171    root_ = new Root(plugin_filename);
     
    100100  }
    101101
    102   void GraphicsEngine::loadRessourceLocations(String dataPath)
     102  void GraphicsEngine::loadRessourceLocations(std::string dataPath)
    103103  {
    104104    //TODO: Specify layout of data file and maybe use xml-loader
     
    111111    ConfigFile::SectionIterator seci = cf.getSectionIterator();
    112112
    113     String secName, typeName, archName;
     113    std::string secName, typeName, archName;
    114114    while (seci.hasMoreElements())
    115115    {
     
    123123
    124124        ResourceGroupManager::getSingleton().addResourceLocation(
    125                                            String(dataPath + archName),
     125                                           std::string(dataPath + archName),
    126126                                           typeName, secName);
    127127      }
  • code/branches/FICN/src/orxonox/GraphicsEngine.h

    r708 r715  
    88#define _GraphicsEngine_H__
    99
     10#include <string>
     11
    1012#include <OgreRoot.h>
    1113#include <OgreSceneManager.h>
    12 
    13 #include "misc/String.h"
    1414
    1515
     
    2222    public:
    2323      GraphicsEngine();
    24       inline void setConfigPath(String path) { this->configPath_ = path; };
     24      inline void setConfigPath(std::string path) { this->configPath_ = path; };
    2525      // find a better way for this
    2626      inline Ogre::Root* getRoot() { return root_; };
    2727      void setup();
    2828      bool load();
    29       void loadRessourceLocations(String path);
     29      void loadRessourceLocations(std::string path);
    3030      Ogre::SceneManager* getSceneManager();
    3131      void startRender();
     
    3434    private:
    3535      Ogre::Root*         root_;        //!< Ogre's root
    36       String         configPath_;  //!< path to config file
    37       String         dataPath_;    //!< path to data file
     36      std::string         configPath_;  //!< path to config file
     37      std::string         dataPath_;    //!< path to data file
    3838      Ogre::SceneManager* scene_;       //!< scene manager of the game
    3939
  • code/branches/FICN/src/orxonox/Orxonox.cc

    r708 r715  
    153153   * @param path path to config (in home dir or something)
    154154   */
    155   void Orxonox::init(int argc, char **argv, String path)
     155  void Orxonox::init(int argc, char **argv, std::string path)
    156156  {
    157157    //TODO: find config file (assuming executable directory)
    158158    //TODO: read config file
    159159    //TODO: give config file to Ogre
    160     String mode;
     160    std::string mode;
    161161//     if(argc>=2)
    162 //       mode = String(argv[1]);
     162//       mode = std::string(argv[1]);
    163163//     else
    164164//       mode = "";
     
    169169    //mode = "presentation";
    170170    if(ar.errorHandling()) die();
    171     if(mode == String("server"))
     171    if(mode == std::string("server"))
    172172    {
    173173      serverInit(path);
    174174      mode_ = SERVER;
    175175    }
    176     else if(mode == String("client"))
     176    else if(mode == std::string("client"))
    177177    {
    178178      clientInit(path);
    179179      mode_ = CLIENT;
    180180    }
    181     else if(mode == String("presentation"))
     181    else if(mode == std::string("presentation"))
    182182    {
    183183      serverInit(path);
     
    243243  }
    244244
    245   void Orxonox::standaloneInit(String path)
     245  void Orxonox::standaloneInit(std::string path)
    246246  {
    247247    ogre_->setConfigPath(path);
     
    262262  }
    263263
    264   void Orxonox::playableServer(String path)
     264  void Orxonox::playableServer(std::string path)
    265265  {
    266266    ogre_->setConfigPath(path);
     
    296296  }
    297297
    298   void Orxonox::serverInit(String path)
     298  void Orxonox::serverInit(std::string path)
    299299  {
    300300    COUT(2) << "initialising server" << std::endl;
     
    306306  }
    307307
    308   void Orxonox::clientInit(String path)
     308  void Orxonox::clientInit(std::string path)
    309309  {
    310310    COUT(2) << "initialising client" << std::endl;
     
    321321  void Orxonox::defineResources()
    322322  {
    323     String secName, typeName, archName;
     323    std::string secName, typeName, archName;
    324324    Ogre::ConfigFile cf;
    325325#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
     
    340340        archName = i->second;
    341341#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
    342         Ogre::ResourceGroupManager::getSingleton().addResourceLocation( String(macBundlePath() + "/" + archName), typeName, secName);
     342        Ogre::ResourceGroupManager::getSingleton().addResourceLocation( std::string(macBundlePath() + "/" + archName), typeName, secName);
    343343#else
    344344        Ogre::ResourceGroupManager::getSingleton().addResourceLocation( archName, typeName, secName);
     
    426426    // fixes auto repeat problem
    427427    #if defined OIS_LINUX_PLATFORM
    428       pl.insert(std::make_pair(String("XAutoRepeatOn"), String("true")));
     428      pl.insert(std::make_pair(std::string("XAutoRepeatOn"), std::string("true")));
    429429    #endif
    430430
     
    432432    win->getCustomAttribute("WINDOW", &windowHnd);
    433433    windowHndStr << windowHnd;
    434     pl.insert(std::make_pair(String("WINDOW"), windowHndStr.str()));
     434    pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
    435435    inputManager_ = OIS::InputManager::createInputSystem(pl);
    436436
  • code/branches/FICN/src/orxonox/Orxonox.h

    r708 r715  
    88#define _Orxonox_H__
    99
     10#include <string>
     11
    1012#include <OgrePrerequisites.h>
    1113#include <OIS/OISPrereqs.h>
     
    1315#include "OrxonoxPrereqs.h"
    1416#include "loader/LoaderPrereqs.h"
    15 
    16 #include "misc/String.h"
    1717#include "GraphicsEngine.h"
    1818
     
    3232  {
    3333    public:
    34       void init(int argc, char **argv, String path);
     34      void init(int argc, char **argv, std::string path);
    3535      void start();
    3636      // not sure if this should be private
     
    4848      virtual ~Orxonox();
    4949      // init functions
    50       void serverInit(String path);
    51       void clientInit(String path);
    52       void standaloneInit(String path);
     50      void serverInit(std::string path);
     51      void clientInit(std::string path);
     52      void standaloneInit(std::string path);
    5353      // run functions
    54       void playableServer(String path);
     54      void playableServer(std::string path);
    5555      void standalone();
    5656      void defineResources();
     
    6666    private:
    6767      GraphicsEngine*       ogre_;      //!< our dearest graphics engine <3
    68       String           dataPath_;  //!< path to data
     68      std::string           dataPath_;  //!< path to data
    6969      loader::LevelLoader*  loader_;    //!< level loader builds the scene
    7070      audio::AudioManager*  auMan_;     //!< audio manager
     
    7979      // this is used to identify the mode (server/client/...) we're in
    8080      gameMode              mode_;
    81       String           serverIp_;
     81      std::string           serverIp_;
    8282  };
    8383}
  • code/branches/FICN/src/orxonox/core/ArgReader.cc

    r708 r715  
    4545  }
    4646
    47   void ArgReader::checkArgument(String option, String &string, bool must)
     47  void ArgReader::checkArgument(std::string option, std::string &string, bool must)
    4848  {
    4949    int argpos = checkOption(option) + 1;
     
    6262  }
    6363
    64   void ArgReader::checkArgument(String option, int &integer, bool must)
     64  void ArgReader::checkArgument(std::string option, int &integer, bool must)
    6565  {
    6666    int argpos = checkOption(option) + 1;
     
    7878  }
    7979
    80   void ArgReader::checkArgument(String option, float &floating, bool must)
     80  void ArgReader::checkArgument(std::string option, float &floating, bool must)
    8181  {
    8282    int argpos = checkOption(option) + 1;
     
    9494  }
    9595
    96   int ArgReader::checkOption(String option)
     96  int ArgReader::checkOption(std::string option)
    9797  {
    9898    for(int i = 1; i < counter_; i++)
  • code/branches/FICN/src/orxonox/core/ArgReader.h

    r708 r715  
    3535#define _ArgReader_H__
    3636
     37#include <string>
     38
    3739#include "CorePrereqs.h"
    38 
    39 #include "misc/String.h"
    4040
    4141namespace orxonox {
     
    4545    public:
    4646      ArgReader(int argc, char **argv);
    47       void checkArgument(String option, String& string, bool must=false);
    48       void checkArgument(String option, int& integer, bool must=false);
    49       void checkArgument(String option, float& floating, bool must=false);
     47      void checkArgument(std::string option, std::string& string, bool must=false);
     48      void checkArgument(std::string option, int& integer, bool must=false);
     49      void checkArgument(std::string option, float& floating, bool must=false);
    5050      bool errorHandling();
    5151    private:
    52       int checkOption(String option);
     52      int checkOption(std::string option);
    5353
    5454    private:
     
    5656      char **arguments_;
    5757      bool fail_;
    58       String errorStr_;
     58      std::string errorStr_;
    5959  };
    6060
  • code/branches/FICN/src/orxonox/core/ClassFactory.h

    r708 r715  
    3636#define _ClassFactory_H__
    3737
     38#include <string>
     39
    3840#include "CorePrereqs.h"
    3941
    40 #include "misc/String.h"
    4142#include "Factory.h"
    4243#include "Identifier.h"
     
    5354    {
    5455        public:
    55             static bool create(const String& name);
     56            static bool create(const std::string& name);
    5657            BaseObject* fabricate();
    5758
     
    6970    */
    7071    template <class T>
    71     bool ClassFactory<T>::create(const String& name)
     72    bool ClassFactory<T>::create(const std::string& name)
    7273    {
    7374        COUT(4) << "*** Create entry for " << name << " in Factory." << std::endl;
  • code/branches/FICN/src/orxonox/core/ConfigValueContainer.cc

    r708 r715  
    4343        @param defvalue The default-value
    4444    */
    45     ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, int defvalue)
     45    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, int defvalue)
    4646    {
    4747        this->bAddedDescription_ = false;
     
    5353        this->searchConfigFileLine();                                               // Search the entry in the config-file
    5454
    55         String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    56         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    57             this->resetConfigFileEntry();                                           // The conversion failed
    58     }
    59 
    60     /**
    61         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    62         @param value This is only needed to determine the right type.
    63         @param classname The name of the class the variable belongs to
    64         @param varname The name of the variable
    65         @param defvalue The default-value
    66     */
    67     ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, unsigned int defvalue)
     55        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     56        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     57            this->resetConfigFileEntry();                                           // The conversion failed
     58    }
     59
     60    /**
     61        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     62        @param value This is only needed to determine the right type.
     63        @param classname The name of the class the variable belongs to
     64        @param varname The name of the variable
     65        @param defvalue The default-value
     66    */
     67    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned int defvalue)
    6868    {
    6969        this->bAddedDescription_ = false;
     
    7575        this->searchConfigFileLine();                                               // Search the entry in the config-file
    7676
    77         String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    78         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    79             this->resetConfigFileEntry();                                           // The conversion failed
    80     }
    81 
    82     /**
    83         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    84         @param value This is only needed to determine the right type.
    85         @param classname The name of the class the variable belongs to
    86         @param varname The name of the variable
    87         @param defvalue The default-value
    88     */
    89     ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, char defvalue)
     77        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     78        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     79            this->resetConfigFileEntry();                                           // The conversion failed
     80    }
     81
     82    /**
     83        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     84        @param value This is only needed to determine the right type.
     85        @param classname The name of the class the variable belongs to
     86        @param varname The name of the variable
     87        @param defvalue The default-value
     88    */
     89    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, char defvalue)
    9090    {
    9191        this->bAddedDescription_ = false;
     
    9797        this->searchConfigFileLine();                                               // Search the entry in the config-file
    9898
    99         String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    100         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    101             this->resetConfigFileEntry();                                           // The conversion failed
    102     }
    103 
    104     /**
    105         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    106         @param value This is only needed to determine the right type.
    107         @param classname The name of the class the variable belongs to
    108         @param varname The name of the variable
    109         @param defvalue The default-value
    110     */
    111     ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, unsigned char defvalue)
     99        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     100        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     101            this->resetConfigFileEntry();                                           // The conversion failed
     102    }
     103
     104    /**
     105        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     106        @param value This is only needed to determine the right type.
     107        @param classname The name of the class the variable belongs to
     108        @param varname The name of the variable
     109        @param defvalue The default-value
     110    */
     111    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned char defvalue)
    112112    {
    113113        this->bAddedDescription_ = false;
     
    119119        this->searchConfigFileLine();                                               // Search the entry in the config-file
    120120
    121         String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    122         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    123             this->resetConfigFileEntry();                                           // The conversion failed
    124     }
    125 
    126     /**
    127         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    128         @param value This is only needed to determine the right type.
    129         @param classname The name of the class the variable belongs to
    130         @param varname The name of the variable
    131         @param defvalue The default-value
    132     */
    133     ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, float defvalue)
     121        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     122        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     123            this->resetConfigFileEntry();                                           // The conversion failed
     124    }
     125
     126    /**
     127        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     128        @param value This is only needed to determine the right type.
     129        @param classname The name of the class the variable belongs to
     130        @param varname The name of the variable
     131        @param defvalue The default-value
     132    */
     133    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, float defvalue)
    134134    {
    135135        this->bAddedDescription_ = false;
     
    141141        this->searchConfigFileLine();                                               // Search the entry in the config-file
    142142
    143         String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    144         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    145             this->resetConfigFileEntry();                                           // The conversion failed
    146     }
    147 
    148     /**
    149         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    150         @param value This is only needed to determine the right type.
    151         @param classname The name of the class the variable belongs to
    152         @param varname The name of the variable
    153         @param defvalue The default-value
    154     */
    155     ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, double defvalue)
     143        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     144        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     145            this->resetConfigFileEntry();                                           // The conversion failed
     146    }
     147
     148    /**
     149        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     150        @param value This is only needed to determine the right type.
     151        @param classname The name of the class the variable belongs to
     152        @param varname The name of the variable
     153        @param defvalue The default-value
     154    */
     155    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, double defvalue)
    156156    {
    157157        this->bAddedDescription_ = false;
     
    163163        this->searchConfigFileLine();                                               // Search the entry in the config-file
    164164
    165         String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    166         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    167             this->resetConfigFileEntry();                                           // The conversion failed
    168     }
    169 
    170     /**
    171         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    172         @param value This is only needed to determine the right type.
    173         @param classname The name of the class the variable belongs to
    174         @param varname The name of the variable
    175         @param defvalue The default-value
    176     */
    177     ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, long double defvalue)
     165        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     166        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     167            this->resetConfigFileEntry();                                           // The conversion failed
     168    }
     169
     170    /**
     171        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     172        @param value This is only needed to determine the right type.
     173        @param classname The name of the class the variable belongs to
     174        @param varname The name of the variable
     175        @param defvalue The default-value
     176    */
     177    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, long double defvalue)
    178178    {
    179179        this->bAddedDescription_ = false;
     
    185185        this->searchConfigFileLine();                                               // Search the entry in the config-file
    186186
    187         String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    188         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    189             this->resetConfigFileEntry();                                           // The conversion failed
    190     }
    191 
    192     /**
    193         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    194         @param value This is only needed to determine the right type.
    195         @param classname The name of the class the variable belongs to
    196         @param varname The name of the variable
    197         @param defvalue The default-value
    198     */
    199     ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, bool defvalue)
     187        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     188        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     189            this->resetConfigFileEntry();                                           // The conversion failed
     190    }
     191
     192    /**
     193        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     194        @param value This is only needed to determine the right type.
     195        @param classname The name of the class the variable belongs to
     196        @param varname The name of the variable
     197        @param defvalue The default-value
     198    */
     199    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, bool defvalue)
    200200    {
    201201        this->bAddedDescription_ = false;
     
    211211
    212212        this->searchConfigFileLine();                                               // Search the entry in the config-file
    213         String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    214         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    215             this->resetConfigFileEntry();                                           // The conversion failed
    216     }
    217 
    218     /**
    219         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    220         @param value This is only needed to determine the right type.
    221         @param classname The name of the class the variable belongs to
    222         @param varname The name of the variable
    223         @param defvalue The default-value
    224     */
    225     ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, const String& defvalue)
     213        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     214        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     215            this->resetConfigFileEntry();                                           // The conversion failed
     216    }
     217
     218    /**
     219        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     220        @param value This is only needed to determine the right type.
     221        @param classname The name of the class the variable belongs to
     222        @param varname The name of the variable
     223        @param defvalue The default-value
     224    */
     225    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, const std::string& defvalue)
    226226    {
    227227        this->bAddedDescription_ = false;
     
    232232        this->defvalueString_ = "\"" + defvalue + "\"";                             // Convert the string to a "config-file-string" with quotes
    233233        this->searchConfigFileLine();                                               // Search the entry in the config-file
    234         String valueString = this->parseValueString(false);                    // Parses the value string from the config-file-entry
    235         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    236             this->resetConfigFileEntry();                                           // The conversion failed
    237     }
    238 
    239     /**
    240         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    241         @param value This is only needed to determine the right type.
    242         @param classname The name of the class the variable belongs to
    243         @param varname The name of the variable
    244         @param defvalue The default-value
    245     */
    246     ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, const char* defvalue)
     234        std::string valueString = this->parseValueString(false);                    // Parses the value string from the config-file-entry
     235        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     236            this->resetConfigFileEntry();                                           // The conversion failed
     237    }
     238
     239    /**
     240        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     241        @param value This is only needed to determine the right type.
     242        @param classname The name of the class the variable belongs to
     243        @param varname The name of the variable
     244        @param defvalue The default-value
     245    */
     246    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, const char* defvalue)
    247247    {
    248248        this->bAddedDescription_ = false;
     
    251251        this->type_ = ConstChar;
    252252
    253         this->defvalueString_ = "\"" + String(defvalue) + "\"";                // Convert the string to a "config-file-string" with quotes
    254         this->searchConfigFileLine();                                               // Search the entry in the config-file
    255         String valueString = this->parseValueString(false);                    // Parses the value string from the config-file-entry
    256         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    257             this->resetConfigFileEntry();                                           // The conversion failed
    258     }
    259 
    260     /**
    261         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    262         @param value This is only needed to determine the right type.
    263         @param classname The name of the class the variable belongs to
    264         @param varname The name of the variable
    265         @param defvalue The default-value
    266     */
    267     ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, Vector2 defvalue)
     253        this->defvalueString_ = "\"" + std::string(defvalue) + "\"";                // Convert the string to a "config-file-string" with quotes
     254        this->searchConfigFileLine();                                               // Search the entry in the config-file
     255        std::string valueString = this->parseValueString(false);                    // Parses the value string from the config-file-entry
     256        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     257            this->resetConfigFileEntry();                                           // The conversion failed
     258    }
     259
     260    /**
     261        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     262        @param value This is only needed to determine the right type.
     263        @param classname The name of the class the variable belongs to
     264        @param varname The name of the variable
     265        @param defvalue The default-value
     266    */
     267    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, Vector2 defvalue)
    268268    {
    269269        this->bAddedDescription_ = false;
     
    280280
    281281        this->searchConfigFileLine();                                               // Search the entry in the config-file
    282         String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    283         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    284             this->resetConfigFileEntry();                                           // The conversion failed
    285     }
    286 
    287     /**
    288         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    289         @param value This is only needed to determine the right type.
    290         @param classname The name of the class the variable belongs to
    291         @param varname The name of the variable
    292         @param defvalue The default-value
    293     */
    294     ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, Vector3 defvalue)
     282        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     283        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     284            this->resetConfigFileEntry();                                           // The conversion failed
     285    }
     286
     287    /**
     288        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     289        @param value This is only needed to determine the right type.
     290        @param classname The name of the class the variable belongs to
     291        @param varname The name of the variable
     292        @param defvalue The default-value
     293    */
     294    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, Vector3 defvalue)
    295295    {
    296296        this->bAddedDescription_ = false;
     
    307307
    308308        this->searchConfigFileLine();                                               // Search the entry in the config-file
    309         String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    310         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    311             this->resetConfigFileEntry();                                           // The conversion failed
    312     }
    313 
    314     /**
    315         @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
    316         @param value This is only needed to determine the right type.
    317         @param classname The name of the class the variable belongs to
    318         @param varname The name of the variable
    319         @param defvalue The default-value
    320     */
    321     ConfigValueContainer::ConfigValueContainer(const String& classname, const String& varname, ColourValue defvalue)
     309        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     310        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     311            this->resetConfigFileEntry();                                           // The conversion failed
     312    }
     313
     314    /**
     315        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
     316        @param value This is only needed to determine the right type.
     317        @param classname The name of the class the variable belongs to
     318        @param varname The name of the variable
     319        @param defvalue The default-value
     320    */
     321    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, ColourValue defvalue)
    322322    {
    323323        this->bAddedDescription_ = false;
     
    334334
    335335        this->searchConfigFileLine();                                               // Search the entry in the config-file
    336         String valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
    337         if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
    338             this->resetConfigFileEntry();                                           // The conversion failed
    339     }
    340 
    341     /**
    342         @brief Parses a given String into a value of the type of the associated variable and assigns it.
    343         @param input The string to convert
    344         @return True if the string was successfully parsed
    345     */
    346     bool ConfigValueContainer::parseSting(const String& input)
     336        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
     337        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
     338            this->resetConfigFileEntry();                                           // The conversion failed
     339    }
     340
     341    /**
     342        @brief Parses a given std::string into a value of the type of the associated variable and assigns it.
     343        @param input The string to convert
     344        @return True if the string was successfully parsed
     345    */
     346    bool ConfigValueContainer::parseSting(const std::string& input)
    347347    {
    348348        if (this->type_ == ConfigValueContainer::Int)
     
    382382        @return True if the string was successfully parsed
    383383    */
    384     bool ConfigValueContainer::parseSting(const String& input, int defvalue)
     384    bool ConfigValueContainer::parseSting(const std::string& input, int defvalue)
    385385    {
    386386        return string2Number(this->value_.value_int_, input, defvalue);
     
    393393        @return True if the string was successfully parsed
    394394    */
    395     bool ConfigValueContainer::parseSting(const String& input, unsigned int defvalue)
     395    bool ConfigValueContainer::parseSting(const std::string& input, unsigned int defvalue)
    396396    {
    397397        return string2Number(this->value_.value_uint_, input, defvalue);
     
    404404        @return True if the string was successfully parsed
    405405    */
    406     bool ConfigValueContainer::parseSting(const String& input, char defvalue)
     406    bool ConfigValueContainer::parseSting(const std::string& input, char defvalue)
    407407    {
    408408        // I used value_int_ instead of value_char_ to avoid number <-> char confusion in the config-file
     
    416416        @return True if the string was successfully parsed
    417417    */
    418     bool ConfigValueContainer::parseSting(const String& input, unsigned char defvalue)
     418    bool ConfigValueContainer::parseSting(const std::string& input, unsigned char defvalue)
    419419    {
    420420        // I used value_uint_ instead of value_uchar_ to avoid number <-> char confusion in the config-file
     
    428428        @return True if the string was successfully parsed
    429429    */
    430     bool ConfigValueContainer::parseSting(const String& input, float defvalue)
     430    bool ConfigValueContainer::parseSting(const std::string& input, float defvalue)
    431431    {
    432432        return string2Number(this->value_.value_float_, input, defvalue);
     
    439439        @return True if the string was successfully parsed
    440440    */
    441     bool ConfigValueContainer::parseSting(const String& input, double defvalue)
     441    bool ConfigValueContainer::parseSting(const std::string& input, double defvalue)
    442442    {
    443443        return string2Number(this->value_.value_double_, input, defvalue);
     
    450450        @return True if the string was successfully parsed
    451451    */
    452     bool ConfigValueContainer::parseSting(const String& input, long double defvalue)
     452    bool ConfigValueContainer::parseSting(const std::string& input, long double defvalue)
    453453    {
    454454        return string2Number(this->value_.value_long_double_, input, defvalue);
     
    461461        @return True if the string was successfully parsed
    462462    */
    463     bool ConfigValueContainer::parseSting(const String& input, bool defvalue)
     463    bool ConfigValueContainer::parseSting(const std::string& input, bool defvalue)
    464464    {
    465465        // Try to parse the value-string - is it a word?
     
    489489        @return True if the string was successfully parsed
    490490    */
    491     bool ConfigValueContainer::parseSting(const String& input, const String& defvalue)
     491    bool ConfigValueContainer::parseSting(const std::string& input, const std::string& defvalue)
    492492    {
    493493        // Strip the quotes
     
    514514        @return True if the string was successfully parsed
    515515    */
    516     bool ConfigValueContainer::parseSting(const String& input, const char* defvalue)
     516    bool ConfigValueContainer::parseSting(const std::string& input, const char* defvalue)
    517517    {
    518518        // Strip the quotes
     
    539539        @return True if the string was successfully parsed
    540540    */
    541     bool ConfigValueContainer::parseSting(const String& input, const Vector2& defvalue)
     541    bool ConfigValueContainer::parseSting(const std::string& input, const Vector2& defvalue)
    542542    {
    543543        // Strip the value-string
     
    548548        if (pos1 < input.length() && pos2 < input.length() && pos1 < pos2)
    549549        {
    550             std::vector<String> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
     550            std::vector<std::string> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
    551551            if (!string2Number(this->value_vector2_.x, tokens[0], defvalue.x))
    552552            {
     
    573573        @return True if the string was successfully parsed
    574574    */
    575     bool ConfigValueContainer::parseSting(const String& input, const Vector3& defvalue)
     575    bool ConfigValueContainer::parseSting(const std::string& input, const Vector3& defvalue)
    576576    {
    577577        // Strip the value-string
     
    582582        if (pos1 < input.length() && pos2 < input.length() && pos1 < pos2)
    583583        {
    584             std::vector<String> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
     584            std::vector<std::string> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
    585585            if (!string2Number(this->value_vector3_.x, tokens[0], defvalue.x))
    586586            {
     
    612612        @return True if the string was successfully parsed
    613613    */
    614     bool ConfigValueContainer::parseSting(const String& input, const ColourValue& defvalue)
     614    bool ConfigValueContainer::parseSting(const std::string& input, const ColourValue& defvalue)
    615615    {
    616616        // Strip the value-string
     
    621621        if (pos1 < input.length() && pos2 < input.length() && pos1 < pos2)
    622622        {
    623             std::vector<String> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
     623            std::vector<std::string> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
    624624            if (!string2Number(this->value_colourvalue_.r, tokens[0], defvalue.r))
    625625            {
     
    678678
    679679        // The string of the section we're searching
    680         String section = "";
     680        std::string section = "";
    681681        section.append("[");
    682682        section.append(this->classname_);
     
    685685        // Iterate through all config-file-lines
    686686        bool success = false;
    687         std::list<String>::iterator it1;
     687        std::list<std::string>::iterator it1;
    688688        for(it1 = ConfigValueContainer::getConfigFileLines().begin(); it1 != ConfigValueContainer::getConfigFileLines().end(); ++it1)
    689689        {
     
    696696                // We found the right section
    697697                bool bLineIsEmpty = false;
    698                 std::list<String>::iterator positionToPutNewLineAt;
     698                std::list<std::string>::iterator positionToPutNewLineAt;
    699699
    700700                // Iterate through all lines in the section
    701                 std::list<String>::iterator it2;
     701                std::list<std::string>::iterator it2;
    702702                for(it2 = ++it1; it2 != ConfigValueContainer::getConfigFileLines().end(); ++it2)
    703703                {
     
    777777        @return True = it's a comment
    778778    */
    779     bool ConfigValueContainer::isComment(const String& line)
     779    bool ConfigValueContainer::isComment(const std::string& line)
    780780    {
    781781        // Strip the line, whitespaces are disturbing
    782         String teststring = getStrippedLine(line);
     782        std::string teststring = getStrippedLine(line);
    783783
    784784        // There are four possible comment-symbols:
     
    798798        @return True = it's empty
    799799    */
    800     bool ConfigValueContainer::isEmpty(const String& line)
     800    bool ConfigValueContainer::isEmpty(const std::string& line)
    801801    {
    802802        return getStrippedLine(line) == "";
     
    808808        @return The stripped line
    809809    */
    810     String ConfigValueContainer::getStrippedLine(const String& line)
    811     {
    812         String output = line;
     810    std::string ConfigValueContainer::getStrippedLine(const std::string& line)
     811    {
     812        std::string output = line;
    813813        unsigned int pos;
    814814        while ((pos = output.find(" ")) < output.length())
     
    825825        @return The value-string
    826826    */
    827     String ConfigValueContainer::parseValueString(bool bStripped)
    828     {
    829         String output;
     827    std::string ConfigValueContainer::parseValueString(bool bStripped)
     828    {
     829        std::string output;
    830830        if (bStripped)
    831831            output = this->getStrippedLine(*this->configFileLine_);
     
    839839        @returns a list, containing all entrys in the config-file.
    840840    */
    841     std::list<String>& ConfigValueContainer::getConfigFileLines()
     841    std::list<std::string>& ConfigValueContainer::getConfigFileLines()
    842842    {
    843843        // This is done to avoid problems while executing this code before main()
    844         static std::list<String> configFileLinesStaticReference = std::list<String>();
     844        static std::list<std::string> configFileLinesStaticReference = std::list<std::string>();
    845845        return configFileLinesStaticReference;
    846846    }
     
    866866        @param filename The name of the config-file
    867867    */
    868     void ConfigValueContainer::readConfigFile(const String& filename)
     868    void ConfigValueContainer::readConfigFile(const std::string& filename)
    869869    {
    870870        // This creates the file if it's not existing
     
    913913        @param filename The name of the config-file
    914914    */
    915     void ConfigValueContainer::writeConfigFile(const String& filename)
     915    void ConfigValueContainer::writeConfigFile(const std::string& filename)
    916916    {
    917917        // Make sure we stored the config-file in the list
     
    930930
    931931        // Iterate through the list an write the lines into the file
    932         std::list<String>::iterator it;
     932        std::list<std::string>::iterator it;
    933933        for (it = ConfigValueContainer::getConfigFileLines().begin(); it != ConfigValueContainer::getConfigFileLines().end(); ++it)
    934934        {
     
    943943        @param description The description
    944944    */
    945     void ConfigValueContainer::description(const String& description)
     945    void ConfigValueContainer::description(const std::string& description)
    946946    {
    947947        if (!this->bAddedDescription_)
    948948        {
    949             this->description_ = String("ConfigValueDescription::" + this->classname_ + "::" + this->varname_);
     949            this->description_ = std::string("ConfigValueDescription::" + this->classname_ + "::" + this->varname_);
    950950            Language::getLanguage().addEntry(description_, description);
    951951            this->bAddedDescription_ = true;
  • code/branches/FICN/src/orxonox/core/ConfigValueContainer.h

    r708 r715  
    4444
    4545#include <list>
     46#include <string>
    4647
    4748#include "CorePrereqs.h"
     
    5152#include "misc/Matrix3.h"
    5253#include "misc/Quaternion.h"
    53 #include "misc/String.h"
    5454#include "misc/ColourValue.h"
    5555#include "Language.h"
     
    9393            };
    9494
    95             ConfigValueContainer(const String& classname, const String& varname, int defvalue);
    96             ConfigValueContainer(const String& classname, const String& varname, unsigned int defvalue);
    97             ConfigValueContainer(const String& classname, const String& varname, char defvalue);
    98             ConfigValueContainer(const String& classname, const String& varname, unsigned char defvalue);
    99             ConfigValueContainer(const String& classname, const String& varname, float defvalue);
    100             ConfigValueContainer(const String& classname, const String& varname, double defvalue);
    101             ConfigValueContainer(const String& classname, const String& varname, long double defvalue);
    102             ConfigValueContainer(const String& classname, const String& varname, bool defvalue);
    103             ConfigValueContainer(const String& classname, const String& varname, const String& defvalue);
    104             ConfigValueContainer(const String& classname, const String& varname, const char* defvalue);
    105             ConfigValueContainer(const String& classname, const String& varname, Vector2 defvalue);
    106             ConfigValueContainer(const String& classname, const String& varname, Vector3 defvalue);
    107             ConfigValueContainer(const String& classname, const String& varname, ColourValue defvalue);
     95            ConfigValueContainer(const std::string& classname, const std::string& varname, int defvalue);
     96            ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned int defvalue);
     97            ConfigValueContainer(const std::string& classname, const std::string& varname, char defvalue);
     98            ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned char defvalue);
     99            ConfigValueContainer(const std::string& classname, const std::string& varname, float defvalue);
     100            ConfigValueContainer(const std::string& classname, const std::string& varname, double defvalue);
     101            ConfigValueContainer(const std::string& classname, const std::string& varname, long double defvalue);
     102            ConfigValueContainer(const std::string& classname, const std::string& varname, bool defvalue);
     103            ConfigValueContainer(const std::string& classname, const std::string& varname, const std::string& defvalue);
     104            ConfigValueContainer(const std::string& classname, const std::string& varname, const char* defvalue);
     105            ConfigValueContainer(const std::string& classname, const std::string& varname, Vector2 defvalue);
     106            ConfigValueContainer(const std::string& classname, const std::string& varname, Vector3 defvalue);
     107            ConfigValueContainer(const std::string& classname, const std::string& varname, ColourValue defvalue);
    108108
    109109            /** @returns the value. @param value This is only needed to determine the right type. */
     
    124124            inline ConfigValueContainer& getValue(bool& value)                          { value = this->value_.value_bool_; return *this; }
    125125            /** @returns the value. @param value This is only needed to determine the right type. */
    126             inline ConfigValueContainer& getValue(String& value)                   { value = this->value_string_; return *this; }
     126            inline ConfigValueContainer& getValue(std::string& value)                   { value = this->value_string_; return *this; }
    127127            /** @returns the value. @param value This is only needed to determine the right type. */
    128128            inline ConfigValueContainer& getValue(const char* value)                    { value = this->value_string_.c_str(); return *this; }
     
    134134            inline ConfigValueContainer& getValue(ColourValue& value)             { value = this->value_colourvalue_; return *this; }
    135135
    136             void description(const String& description);
     136            void description(const std::string& description);
    137137
    138             bool parseSting(const String& input);
     138            bool parseSting(const std::string& input);
    139139            void resetConfigFileEntry();
    140140            void resetConfigValue();
    141141
    142             static String getStrippedLine(const String& line);
    143             static bool isEmpty(const String& line);
    144             static bool isComment(const String& line);
     142            static std::string getStrippedLine(const std::string& line);
     143            static bool isEmpty(const std::string& line);
     144            static bool isComment(const std::string& line);
    145145
    146146        private:
    147             bool parseSting(const String& input, int defvalue);
    148             bool parseSting(const String& input, unsigned int defvalue);
    149             bool parseSting(const String& input, char defvalue);
    150             bool parseSting(const String& input, unsigned char defvalue);
    151             bool parseSting(const String& input, float defvalue);
    152             bool parseSting(const String& input, double defvalue);
    153             bool parseSting(const String& input, long double defvalue);
    154             bool parseSting(const String& input, bool defvalue);
    155             bool parseSting(const String& input, const String& defvalue);
    156             bool parseSting(const String& input, const char* defvalue);
    157             bool parseSting(const String& input, const Vector2& defvalue);
    158             bool parseSting(const String& input, const Vector3& defvalue);
    159             bool parseSting(const String& input, const ColourValue& defvalue);
     147            bool parseSting(const std::string& input, int defvalue);
     148            bool parseSting(const std::string& input, unsigned int defvalue);
     149            bool parseSting(const std::string& input, char defvalue);
     150            bool parseSting(const std::string& input, unsigned char defvalue);
     151            bool parseSting(const std::string& input, float defvalue);
     152            bool parseSting(const std::string& input, double defvalue);
     153            bool parseSting(const std::string& input, long double defvalue);
     154            bool parseSting(const std::string& input, bool defvalue);
     155            bool parseSting(const std::string& input, const std::string& defvalue);
     156            bool parseSting(const std::string& input, const char* defvalue);
     157            bool parseSting(const std::string& input, const Vector2& defvalue);
     158            bool parseSting(const std::string& input, const Vector3& defvalue);
     159            bool parseSting(const std::string& input, const ColourValue& defvalue);
    160160
    161             static std::list<String>& getConfigFileLines();
     161            static std::list<std::string>& getConfigFileLines();
    162162            static bool finishedReadingConfigFile(bool finished = false);
    163163            void searchConfigFileLine();
    164             String parseValueString(bool bStripped = true);
     164            std::string parseValueString(bool bStripped = true);
    165165
    166             static void readConfigFile(const String& filename);
    167             static void writeConfigFile(const String& filename);
     166            static void readConfigFile(const std::string& filename);
     167            static void writeConfigFile(const std::string& filename);
    168168
    169             String         classname_;                     //!< The name of the class the variable belongs to
    170             String         varname_;                       //!< The name of the variable
    171             String         defvalueString_;                //!< The string of the default-variable
     169            std::string         classname_;                     //!< The name of the class the variable belongs to
     170            std::string         varname_;                       //!< The name of the variable
     171            std::string         defvalueString_;                //!< The string of the default-variable
    172172
    173173            union MultiType
     
    183183            } value_;                                           //!< The value of the variable
    184184
    185             String         value_string_;                  //!< The value, if the variable is of the type string
     185            std::string         value_string_;                  //!< The value, if the variable is of the type string
    186186            Vector2       value_vector2_;                 //!< The value, if the variable is of the type Vector2
    187187            Vector3       value_vector3_;                 //!< The value, if the variable is of the type Vector3
    188188            ColourValue   value_colourvalue_;             //!< The value, if the variable is of the type ColourValue
    189189
    190             std::list<String>::iterator configFileLine_;   //!< An iterator, pointing to the entry of the variable in the config-file
     190            std::list<std::string>::iterator configFileLine_;   //!< An iterator, pointing to the entry of the variable in the config-file
    191191
    192192            VariableType type_;                                 //!< The type of the variable
  • code/branches/FICN/src/orxonox/core/Error.cc

    r708 r715  
    3636        }
    3737
    38         Error::Error(String errorMsg, int errorCode)
     38        Error::Error(std::string errorMsg, int errorCode)
    3939        {
    4040                Error(errorCode, errorMsg);
    4141        }
    4242
    43         Error::Error(int errorCode, String errorMsg)
     43        Error::Error(int errorCode, std::string errorMsg)
    4444        {
    4545                COUT(1) << "############################ "<< std::endl
  • code/branches/FICN/src/orxonox/core/Error.h

    r708 r715  
    2929#define _Error_H__
    3030
     31#include <string>
     32
    3133#include "CorePrereqs.h"
    32 
    33 #include "misc/String.h"
    3434
    3535namespace orxonox
     
    3939        public:
    4040                Error();
    41                 Error(String errorMsg, int errorCode = 0);
    42                 Error(int errorCode, String errorMsg = "");
     41                Error(std::string errorMsg, int errorCode = 0);
     42                Error(int errorCode, std::string errorMsg = "");
    4343        private:
    4444
  • code/branches/FICN/src/orxonox/core/Factory.cc

    r708 r715  
    4242        @param name The name of the wanted Identifier
    4343    */
    44     Identifier* Factory::getIdentifier(const String& name)
     44    Identifier* Factory::getIdentifier(const std::string& name)
    4545    {
    4646        return getFactoryPointer()->identifierStringMap_[name];
     
    6161        @param identifier The identifier to add
    6262    */
    63     void Factory::add(const String& name, Identifier* identifier)
     63    void Factory::add(const std::string& name, Identifier* identifier)
    6464    {
    6565        getFactoryPointer()->identifierStringMap_[name] = identifier;
     
    8585    {
    8686        COUT(3) << "*** Factory -> Create class-hierarchy" << std::endl;
    87         std::map<String, Identifier*>::iterator it;
     87        std::map<std::string, Identifier*>::iterator it;
    8888        it = getFactoryPointer()->identifierStringMap_.begin();
    8989        (*getFactoryPointer()->identifierStringMap_.begin()).second->startCreatingHierarchy();
  • code/branches/FICN/src/orxonox/core/Factory.h

    r708 r715  
    4545
    4646#include <map>
     47#include <string>
    4748
    4849#include "CorePrereqs.h"
    49 
    50 #include "misc/String.h"
    5150
    5251namespace orxonox
     
    6160    {
    6261        public:
    63             static Identifier* getIdentifier(const String& name);
     62            static Identifier* getIdentifier(const std::string& name);
    6463            static Identifier* getIdentifier(const unsigned int id);
    65             static void add(const String& name, Identifier* identifier);
     64            static void add(const std::string& name, Identifier* identifier);
    6665            static void changeNetworkID(Identifier* identifier, const unsigned int oldID, const unsigned int newID);
    6766            static void createClassHierarchy();
     
    7473            ~Factory() {}                           // don't delete
    7574
    76             std::map<String, Identifier*> identifierStringMap_;            //!< The map, mapping the name with the Identifier
     75            std::map<std::string, Identifier*> identifierStringMap_;            //!< The map, mapping the name with the Identifier
    7776            std::map<unsigned int, Identifier*> identifierNetworkIDMap_;        //!< The map, mapping the network ID with the Identifier
    7877    };
  • code/branches/FICN/src/orxonox/core/Identifier.cc

    r708 r715  
    118118        @returns a reference to the Identifier map, containing all Identifiers.
    119119    */
    120     std::map<String, Identifier*>& Identifier::getIdentifierMap()
     120    std::map<std::string, Identifier*>& Identifier::getIdentifierMap()
    121121    {
    122         static std::map<String, Identifier*> identifierMapStaticReference = std::map<String, Identifier*>();
     122        static std::map<std::string, Identifier*> identifierMapStaticReference = std::map<std::string, Identifier*>();
    123123        return identifierMapStaticReference;
    124124    }
  • code/branches/FICN/src/orxonox/core/Identifier.h

    r708 r715  
    5353
    5454#include <map>
     55#include <string>
    5556
    5657#include "CorePrereqs.h"
    5758
    58 #include "misc/String.h"
    5959#include "ObjectList.h"
    6060#include "IdentifierList.h"
     
    112112
    113113            /** @returns the name of the class the Identifier belongs to. */
    114             inline const String& getName() const { return this->name_; }
     114            inline const std::string& getName() const { return this->name_; }
    115115
    116116            /** @returns the parents of the class the Identifier belongs to. */
     
    130130
    131131            /** @returns the ConfigValueContainer of a variable, given by the string of its name. @param varname The name of the variable */
    132             inline ConfigValueContainer* getConfigValueContainer(const String& varname)
     132            inline ConfigValueContainer* getConfigValueContainer(const std::string& varname)
    133133                { return this->configValues_[varname]; }
    134134
    135135            /** @brief Sets the ConfigValueContainer of a variable, given by the string of its name. @param varname The name of the variablee @param container The container */
    136             inline void setConfigValueContainer(const String& varname, ConfigValueContainer* container)
     136            inline void setConfigValueContainer(const std::string& varname, ConfigValueContainer* container)
    137137                { this->configValues_[varname] = container; }
    138138
    139             static std::map<String, Identifier*>& getIdentifierMap();
     139            static std::map<std::string, Identifier*>& getIdentifierMap();
    140140
    141141        private:
     
    166166            IdentifierList* children_;                                  //!< The Children of the class the Identifier belongs to
    167167
    168             String name_;                                          //!< The name of the class the Identifier belongs to
     168            std::string name_;                                          //!< The name of the class the Identifier belongs to
    169169
    170170            BaseFactory* factory_;                                      //!< The Factory, able to create new objects of the given class (if available)
     
    172172            static int hierarchyCreatingCounter_s;                      //!< Bigger than zero if at least one Identifier stores its parents (its an int instead of a bool to avoid conflicts with multithreading)
    173173            unsigned int classID_;                                      //!< The network ID to identify a class through the network
    174             std::map<String, ConfigValueContainer*> configValues_; //!< A map to link the string of configurable variables with their ConfigValueContainer
     174            std::map<std::string, ConfigValueContainer*> configValues_; //!< A map to link the string of configurable variables with their ConfigValueContainer
    175175    };
    176176
     
    189189    {
    190190        public:
    191             static ClassIdentifier<T>* registerClass(const IdentifierList* parents, const String& name, bool bRootClass);
     191            static ClassIdentifier<T>* registerClass(const IdentifierList* parents, const std::string& name, bool bRootClass);
    192192            static void addObject(T* object);
    193193            static ClassIdentifier<T>* getIdentifier();
    194             void setName(const String& name);
     194            void setName(const std::string& name);
    195195
    196196        private:
     
    221221    */
    222222    template <class T>
    223     ClassIdentifier<T>* ClassIdentifier<T>::registerClass(const IdentifierList* parents, const String& name, bool bRootClass)
     223    ClassIdentifier<T>* ClassIdentifier<T>::registerClass(const IdentifierList* parents, const std::string& name, bool bRootClass)
    224224    {
    225225        COUT(4) << "*** Register Class in " << name << "-Singleton." << std::endl;
     
    265265    */
    266266    template <class T>
    267     void ClassIdentifier<T>::setName(const String& name)
     267    void ClassIdentifier<T>::setName(const std::string& name)
    268268    {
    269269        // Make sure we didn't already set the name, to avoid duplicate entries in the Identifier map
     
    271271        {
    272272            this->name_ = name;
    273             this->getIdentifierMap().insert(std::pair<String, Identifier*>(name, this));
     273            this->getIdentifierMap().insert(std::pair<std::string, Identifier*>(name, this));
    274274            this->bSetName_ = true;
    275275        }
  • code/branches/FICN/src/orxonox/core/IdentifierList.cc

    r708 r715  
    130130        @returns a string, containing a list of the names of all Identifiers in the list.
    131131    */
    132     String IdentifierList::toString() const
     132    std::string IdentifierList::toString() const
    133133    {
    134134        IdentifierListElement* temp = this->first_;
    135         String output = "";
     135        std::string output = "";
    136136
    137137        while (temp)
  • code/branches/FICN/src/orxonox/core/IdentifierList.h

    r708 r715  
    3737#define _IdentifierList_H__
    3838
     39#include <string>
     40
    3941#include "CorePrereqs.h"
    40 
    41 #include "misc/String.h"
    4242
    4343namespace orxonox
     
    6262            void remove(const Identifier* identifier);
    6363            bool isInList(const Identifier* identifier) const;
    64             String toString() const;
     64            std::string toString() const;
    6565
    6666            IdentifierListElement* first_;      //!< The first element in the list
  • code/branches/FICN/src/orxonox/core/Language.cc

    r708 r715  
    3636    // ###      LanguageEntry      ###
    3737    // ###############################
    38     LanguageEntry::LanguageEntry(const String& fallbackEntry)
     38    LanguageEntry::LanguageEntry(const std::string& fallbackEntry)
    3939    {
    4040        RegisterRootObject(LanguageEntry);
     
    4444    }
    4545
    46     void LanguageEntry::setTranslation(const String& translation)
     46    void LanguageEntry::setTranslation(const std::string& translation)
    4747    {
    4848        if (translation.compare("") != 0)
     
    5252    }
    5353
    54     void LanguageEntry::setDefault(const String& fallbackEntry)
     54    void LanguageEntry::setDefault(const std::string& fallbackEntry)
    5555    {
    5656        if (this->translatedEntry_.compare(this->fallbackEntry_) == 0)
     
    8585    }
    8686
    87     void Language::createEntry(const LanguageEntryName& name, const String& entry)
     87    void Language::createEntry(const LanguageEntryName& name, const std::string& entry)
    8888    {
    8989        if (!this->languageEntries_[name])
     
    9999    }
    100100
    101     void Language::addEntry(const LanguageEntryName& name, const String& entry)
    102     {
    103         std::map<String, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
     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);
    104104        if (!it->second)
    105105            this->createEntry(name, entry);
     
    112112    }
    113113
    114     const String& Language::getTranslation(const LanguageEntryName& name) const
    115     {
    116         std::map<String, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
     114    const std::string& Language::getTranslation(const LanguageEntryName& name) const
     115    {
     116        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
    117117        if (it->second)
    118118            return it->second->getTranslation();
     
    124124    }
    125125
    126     const String Language::getFileName(const String& language)
    127     {
    128         return String("translation_" + language + ".lang");
     126    const std::string Language::getFileName(const std::string& language)
     127    {
     128        return std::string("translation_" + language + ".lang");
    129129    }
    130130
     
    154154        {
    155155            file.getline(line, 1024);
    156             String lineString = String(line);
     156            std::string lineString = std::string(line);
    157157            if (lineString.compare("") != 0)
    158158            {
     
    190190        {
    191191            file.getline(line, 1024);
    192             String lineString = String(line);
     192            std::string lineString = std::string(line);
    193193            if (lineString.compare("") != 0)
    194194            {
     
    196196                if (pos < lineString.size() && lineString.size() >= 3)
    197197                {
    198                     std::map<String, LanguageEntry*>::const_iterator it = this->languageEntries_.find(lineString.substr(0, pos));
     198                    std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(lineString.substr(0, pos));
    199199                    if (it->second)
    200200                        it->second->setTranslation(lineString.substr(pos + 1));
  • code/branches/FICN/src/orxonox/core/Language.h

    r708 r715  
    3030
    3131#include <map>
     32#include <string>
    3233
    3334#include "CorePrereqs.h"
    3435
    35 #include "misc/String.h"
    3636#include "OrxonoxClass.h"
    3737
    3838namespace orxonox
    3939{
    40     typedef String LanguageEntryName;
     40    typedef std::string LanguageEntryName;
    4141
    4242    class _CoreExport LanguageEntry : public OrxonoxClass
    4343    {
    4444        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);
    4848
    49             inline const String& getTranslation()
     49            inline const std::string& getTranslation()
    5050                { return this->translatedEntry_; }
    5151
    52             inline const String& getDefault()
     52            inline const std::string& getDefault()
    5353                { return this->fallbackEntry_; }
    5454
    5555        private:
    56             String fallbackEntry_;
    57             String translatedEntry_;
     56            std::string fallbackEntry_;
     57            std::string translatedEntry_;
    5858    };
    5959
     
    6363            static Language& getLanguage();
    6464            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;
    6767
    6868        private:
     
    7474            void readTranslatedLanguageFile();
    7575            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);
    7878
    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_;
    8383    };
    8484}
  • code/branches/FICN/src/orxonox/core/OrxonoxClass.h

    r708 r715  
    3737#define _OrxonoxClass_H__
    3838
     39#include <string>
     40
    3941#include "CorePrereqs.h"
    40 
    41 #include "misc/String.h"
    4242#include "MetaObjectList.h"
    4343#include "Identifier.h"
     
    132132
    133133            /** @brief Sets the name of the object. @param name The name */
    134             inline virtual void setName(const String& name) { this->name_ = name; }
     134            inline virtual void setName(const std::string& name) { this->name_ = name; }
    135135
    136136            /** @returns the name of the object. */
    137             inline const String& getName() const { return this->name_; }
     137            inline const std::string& getName() const { return this->name_; }
    138138
    139139            /** @brief Sets the state of the objects activity. @param bActive True = active */
     
    154154            MetaObjectList metaList_;       //!< MetaObjectList, containing all ObjectLists and ObjectListElements the object is registered in
    155155
    156             String name_;              //!< The name of the object
     156            std::string name_;              //!< The name of the object
    157157            bool bActive_;                  //!< True = the object is active
    158158            bool bVisible_;                 //!< True = the object is visible
  • code/branches/FICN/src/orxonox/core/OutputHandler.cc

    r708 r715  
    3535        @param logfilename The name of the logfile
    3636    */
    37     OutputHandler::OutputHandler(const String& logfilename)
     37    OutputHandler::OutputHandler(const std::string& logfilename)
    3838    {
    3939        this->logfilename_ = logfilename;
  • code/branches/FICN/src/orxonox/core/OutputHandler.h

    r708 r715  
    3939#include <iostream>
    4040#include <fstream>
     41#include <string>
    4142
    42 #include "misc/String.h"
    4343#include "CorePrereqs.h"
    4444
     
    108108
    109109        private:
    110             explicit OutputHandler(const String& logfilename);
     110            explicit OutputHandler(const std::string& logfilename);
    111111            OutputHandler(const OutputHandler& oh) {}; // don't copy
    112112            virtual ~OutputHandler();
    113113            std::ofstream logfile_;     //!< The logfile where the output is logged
    114             String logfilename_;   //!< The name of the logfile
     114            std::string logfilename_;   //!< The name of the logfile
    115115            int outputLevel_;           //!< The level of the incoming output
    116116    };
  • code/branches/FICN/src/orxonox/hud/HUD.cc

    r708 r715  
    8080  }
    8181
    82   void HUD::setTargetWindowName(String i){
     82  void HUD::setTargetWindowName(std::string i){
    8383    targetWindowName_=i;
    8484    targetWindowNameText_->setCaption( targetWindowName_ );
    8585  }
    8686
    87   void HUD::setTargetWindowStatus(String i){
     87  void HUD::setTargetWindowStatus(std::string i){
    8888    targetWindowStatus_=i;
    8989    targetWindowStatusText_->setCaption( targetWindowStatus_ );
  • code/branches/FICN/src/orxonox/hud/HUD.h

    r708 r715  
    2929#define _HUD_H__
    3030
     31#include <string>
     32
    3133#include <OgrePrerequisites.h>
    3234
    3335#include "../OrxonoxPrereqs.h"
    34 
    35 #include "misc/String.h"
    3636
    3737
     
    6161    int timeSec_;
    6262
    63     String targetWindowName_;
    64     String targetWindowStatus_;
     63    std::string targetWindowName_;
     64    std::string targetWindowStatus_;
    6565    int targetWindowDistance_;
    6666    int targetWindowHitRating_;
     
    9393
    9494    void setTime(int i, int j);
    95     void setTargetWindowName(String i);
    96     void setTargetWindowStatus(String i);
     95    void setTargetWindowName(std::string i);
     96    void setTargetWindowStatus(std::string i);
    9797    void setTargetWindowDistance(int i);
    9898    void setTargetWindowHitRating(int i);
  • code/branches/FICN/src/orxonox/objects/Ambient.cc

    r708 r715  
    2727
    2828#include <vector>
     29#include <string>
    2930
    3031#include <OgreSceneManager.h>
     
    3435#include "misc/String2Number.h"
    3536#include "misc/ColourValue.h"
    36 #include "misc/String.h"
    3737#include "../core/Debug.h"
    3838#include "../core/CoreIncludes.h"
     
    6161        {
    6262
    63                 std::vector<String> colourvalues = tokenize(xmlElem->Attribute("colourvalue"),",");
     63                std::vector<std::string> colourvalues = tokenize(xmlElem->Attribute("colourvalue"),",");
    6464                float r, g, b;
    6565                String2Number<float>(r, colourvalues[0]);
  • code/branches/FICN/src/orxonox/objects/BillboardSet.cc

    r708 r715  
    4545    }
    4646
    47     void BillboardSet::setBillboardSet(const String& file, const ColourValue& colour, int count, const Vector3& position)
     47    void BillboardSet::setBillboardSet(const std::string& file, const ColourValue& colour, int count, const Vector3& position)
    4848    {
    4949        std::ostringstream name;
  • code/branches/FICN/src/orxonox/objects/BillboardSet.h

    r708 r715  
    11#ifndef _BillboardSet_H__
    22#define _BillboardSet_H__
     3
     4#include <string>
    35
    46#include <OgreBillboardSet.h>
     
    68#include "../OrxonoxPrereqs.h"
    79
    8 #include "misc/String.h"
    910#include "../core/CoreIncludes.h"
    1011#include "misc/ColourValue.h"
     
    1819            BillboardSet();
    1920            ~BillboardSet();
    20             void setBillboardSet(const String& file, const ColourValue& colour = ColourValue(1.0, 1.0, 1.0), int count = 1, const Vector3& position = Vector3::ZERO);
     21            void setBillboardSet(const std::string& file, const ColourValue& colour = ColourValue(1.0, 1.0, 1.0), int count = 1, const Vector3& position = Vector3::ZERO);
    2122
    2223            inline Ogre::BillboardSet* getBillboardSet()
    2324                { return this->billboardSet_; }
    2425
    25             inline const String& getName() const
     26            inline const std::string& getName() const
    2627                { return this->billboardSet_->getName(); }
    2728
  • code/branches/FICN/src/orxonox/objects/Camera.cc

    r708 r715  
     1#include <string>
     2
    13#include <OgreSceneManager.h>
    24#include <OgreSceneNode.h>
     
    911#include "misc/String2Number.h"
    1012#include "misc/Vector3.h"
    11 #include "misc/String.h"
    1213#include "../core/Debug.h"
    1314#include "../core/CoreIncludes.h"
     
    3839        //    <Camera name="Camera" pos="0,0,-250" lookat="0,0,0" />
    3940
    40         String name = xmlElem->Attribute("name");
    41         String pos = xmlElem->Attribute("pos");
    42         String lookat = xmlElem->Attribute("lookat");
     41        std::string name = xmlElem->Attribute("name");
     42        std::string pos = xmlElem->Attribute("pos");
     43        std::string lookat = xmlElem->Attribute("lookat");
    4344
    4445        Ogre::Camera *cam = mgr->createCamera(name);
    4546
    4647        float x, y, z;
    47         std::vector<String> posVec = tokenize(xmlElem->Attribute("pos"),",");
     48        std::vector<std::string> posVec = tokenize(xmlElem->Attribute("pos"),",");
    4849        String2Number<float>(x, posVec[0]);
    4950        String2Number<float>(y, posVec[1]);
     
    5960        cam->lookAt(Vector3(x,y,z));
    6061
    61         String node = xmlElem->Attribute("node");
     62        std::string node = xmlElem->Attribute("node");
    6263
    6364        Ogre::SceneNode* sceneNode = (Ogre::SceneNode*)mgr->getRootSceneNode()->createChildSceneNode(node); //getChild(node);
  • code/branches/FICN/src/orxonox/objects/Fighter.cc

    r708 r715  
    2626 */
    2727
     28#include <string>
     29
    2830#include <OgreCamera.h>
    2931#include <OgreRenderWindow.h>
     
    3335#include "tinyxml/tinyxml.h"
    3436#include "misc/String2Number.h"
    35 #include "misc/String.h"
    3637#include "../core/CoreIncludes.h"
    3738#include "../Orxonox.h"
     
    174175        if (xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft"))
    175176        {
    176             String forwardStr = xmlElem->Attribute("forward");
    177             String rotateupdownStr = xmlElem->Attribute("rotateupdown");
    178             String rotaterightleftStr = xmlElem->Attribute("rotaterightleft");
    179             String looprightleftStr = xmlElem->Attribute("looprightleft");
     177            std::string forwardStr = xmlElem->Attribute("forward");
     178            std::string rotateupdownStr = xmlElem->Attribute("rotateupdown");
     179            std::string rotaterightleftStr = xmlElem->Attribute("rotaterightleft");
     180            std::string looprightleftStr = xmlElem->Attribute("looprightleft");
    180181
    181182            String2Number<float>(this->maxSpeedForward_, forwardStr);
  • code/branches/FICN/src/orxonox/objects/Light.h

    r708 r715  
    11#ifndef _Light_H__
    22#define _Light_H__
     3
     4#include <string>
    35
    46#include <OgreLight.h>
     
    68#include "../OrxonoxPrereqs.h"
    79
    8 #include "misc/String.h"
    910#include "misc/ColourValue.h"
    1011
     
    2122                { return this->light_; }
    2223
    23             inline const String& getName() const
     24            inline const std::string& getName() const
    2425                { return this->light_->getName(); }
    2526
  • code/branches/FICN/src/orxonox/objects/Mesh.cc

    r708 r715  
    4343    }
    4444
    45     void Mesh::setMesh(const String& file)
     45    void Mesh::setMesh(const std::string& file)
    4646    {
    4747        std::ostringstream name;
  • code/branches/FICN/src/orxonox/objects/Mesh.h

    r708 r715  
    11#ifndef _Mesh_H__
    22#define _Mesh_H__
     3
     4#include <string>
    35
    46#include <OgreEntity.h>
    57
    68#include "../OrxonoxPrereqs.h"
    7 
    8 #include "misc/String.h"
    99
    1010namespace orxonox
     
    1515            Mesh();
    1616            ~Mesh();
    17             void setMesh(const String& file);
     17            void setMesh(const std::string& file);
    1818
    1919            inline Ogre::Entity* getEntity()
    2020                { return this->entity_; }
    2121
    22             inline const String& getName() const
     22            inline const std::string& getName() const
    2323                { return this->entity_->getName(); }
    2424
  • code/branches/FICN/src/orxonox/objects/Model.h

    r708 r715  
    2121
    2222        private:
    23             String meshSrc_;
     23            std::string meshSrc_;
    2424            Mesh mesh_;
    2525            void registerAllVariables();
  • code/branches/FICN/src/orxonox/objects/Skybox.cc

    r708 r715  
    2626 */
    2727
     28#include <string>
     29
    2830#include <OgreSceneManager.h>
    2931
     
    3133//#include "misc/Tokenizer.h"
    3234//#include "misc/String2Number.h"
    33 #include "misc/String.h"
    3435#include "../Orxonox.h"
    3536#include "../core/CoreIncludes.h"
     
    5758        if (xmlElem->Attribute("src"))
    5859        {
    59                 String skyboxSrc = xmlElem->Attribute("src");
     60                std::string skyboxSrc = xmlElem->Attribute("src");
    6061                mgr->setSkyBox(true, skyboxSrc);
    6162
  • code/branches/FICN/src/orxonox/objects/SpaceShip.cc

    r708 r715  
    2626 */
    2727
     28#include <string>
     29
    2830#include <OIS/OIS.h>
    2931#include <OgreCamera.h>
     
    3436#include "tinyxml/tinyxml.h"
    3537#include "misc/String2Number.h"
    36 #include "misc/String.h"
    3738#include "../core/CoreIncludes.h"
    3839#include "../core/Debug.h"
     
    196197        if (xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft"))
    197198        {
    198             String forwardStr = xmlElem->Attribute("forward");
    199             String rotateupdownStr = xmlElem->Attribute("rotateupdown");
    200             String rotaterightleftStr = xmlElem->Attribute("rotaterightleft");
    201             String looprightleftStr = xmlElem->Attribute("looprightleft");
     199            std::string forwardStr = xmlElem->Attribute("forward");
     200            std::string rotateupdownStr = xmlElem->Attribute("rotateupdown");
     201            std::string rotaterightleftStr = xmlElem->Attribute("rotaterightleft");
     202            std::string looprightleftStr = xmlElem->Attribute("looprightleft");
    202203
    203204            String2Number<float>(this->maxSpeedForward_, forwardStr);
     
    212213        {
    213214
    214             String msStr = xmlElem->Attribute("maxSpeed");
    215             String msabsStr = xmlElem->Attribute("maxSideAndBackSpeed");
    216             String mrStr = xmlElem->Attribute("maxRotation");
    217             String taStr = xmlElem->Attribute("transAcc");
    218             String raStr = xmlElem->Attribute("rotAcc");
    219             String tdStr = xmlElem->Attribute("transDamp");
    220             String rdStr = xmlElem->Attribute("rotDamp");
     215            std::string msStr = xmlElem->Attribute("maxSpeed");
     216            std::string msabsStr = xmlElem->Attribute("maxSideAndBackSpeed");
     217            std::string mrStr = xmlElem->Attribute("maxRotation");
     218            std::string taStr = xmlElem->Attribute("transAcc");
     219            std::string raStr = xmlElem->Attribute("rotAcc");
     220            std::string tdStr = xmlElem->Attribute("transDamp");
     221            std::string rdStr = xmlElem->Attribute("rotDamp");
    221222
    222223            String2Number<float>(this->maxSpeed_, msStr);
  • code/branches/FICN/src/orxonox/objects/WorldEntity.cc

    r708 r715  
    2626 */
    2727
     28#include <string>
    2829#include <sstream>
    2930
     
    3132#include "misc/Tokenizer.h"
    3233#include "misc/String2Number.h"
    33 #include "misc/String.h"
    3434#include "../core/CoreIncludes.h"
    3535#include "../Orxonox.h"
     
    8888        if (xmlElem->Attribute("position"))
    8989        {
    90             std::vector<String> pos = tokenize(xmlElem->Attribute("position"),",");
     90            std::vector<std::string> pos = tokenize(xmlElem->Attribute("position"),",");
    9191            float x, y, z;
    9292            String2Number<float>(x, pos[0]);
     
    9898        if (xmlElem->Attribute("direction"))
    9999        {
    100             std::vector<String> pos = tokenize(xmlElem->Attribute("direction"),",");
     100            std::vector<std::string> pos = tokenize(xmlElem->Attribute("direction"),",");
    101101            float x, y, z;
    102102            String2Number<float>(x, pos[0]);
     
    125125        if (xmlElem->Attribute("scale"))
    126126        {
    127             String scaleStr = xmlElem->Attribute("scale");
     127            std::string scaleStr = xmlElem->Attribute("scale");
    128128            float scale;
    129129            String2Number<float>(scale, scaleStr);
     
    133133        if (xmlElem->Attribute("rotationAxis"))
    134134        {
    135             std::vector<String> pos = tokenize(xmlElem->Attribute("rotationAxis"),",");
     135            std::vector<std::string> pos = tokenize(xmlElem->Attribute("rotationAxis"),",");
    136136            float x, y, z;
    137137            String2Number<float>(x, pos[0]);
  • code/branches/FICN/src/orxonox/objects/weapon_system/AmmunitionDump.cc

    r708 r715  
    5959  }
    6060
    61   void AmmunitionDump::setDumpSize(const String &name, int size)
     61  void AmmunitionDump::setDumpSize(const std::string &name, int size)
    6262  {
    6363    if (size < 0)
     
    7070
    7171
    72   int AmmunitionDump::store(const String &name, int quantity)
     72  int AmmunitionDump::store(const std::string &name, int quantity)
    7373  {
    7474    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
     
    8787
    8888
    89   int AmmunitionDump::getAmmunition(const String &name, int quantity)
     89  int AmmunitionDump::getAmmunition(const std::string &name, int quantity)
    9090  {
    9191    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
     
    103103
    104104
    105   int AmmunitionDump::getStockSize(const String &name)
     105  int AmmunitionDump::getStockSize(const std::string &name)
    106106  {
    107107    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
  • code/branches/FICN/src/orxonox/objects/weapon_system/AmmunitionDump.h

    r708 r715  
    3030#define _AmmunitionDump_H__
    3131
     32#include <string>
     33
    3234#include <OgrePrerequisites.h>
    3335
     
    3638#include "network/Synchronisable.h"
    3739//#include "../core/CoreIncludes.h"
    38 #include "misc/String.h"
    3940#include "../BaseObject.h"
    4041
     
    4748          ~AmmunitionDump();
    4849
    49     void setDumpSize(const String &name, int size);
     50    void setDumpSize(const std::string &name, int size);
    5051
    51     int store(const String &name, int quantiy);
     52    int store(const std::string &name, int quantiy);
    5253
    53     int getAmmunition(const String &name, int quantity);
     54    int getAmmunition(const std::string &name, int quantity);
    5455
    55     int getStockSize(const String &name);
     56    int getStockSize(const std::string &name);
    5657
    5758    virtual void loadParams(TiXmlElement* xmlElem) { BaseObject::loadParams(xmlElem); };
  • code/branches/FICN/src/orxonox/objects/weapon_system/BulletManager.cc

    r708 r715  
    8282  }
    8383
    84   int BulletManager::getAmmunitionID(const String &ammoName)
     84  int BulletManager::getAmmunitionID(const std::string &ammoName)
    8585  {
    86     String ammoTypes[] = { "Energy Cell", "Barrel", "Lead Shot" };
     86    std::string ammoTypes[] = { "Energy Cell", "Barrel", "Lead Shot" };
    8787    int ammoTypesLength = 3;
    8888
  • code/branches/FICN/src/orxonox/objects/weapon_system/BulletManager.h

    r708 r715  
    3030#define _BulletManager_H__
    3131
     32#include <string>
     33
    3234#include <OgrePrerequisites.h>
    3335
     
    3739#include "tinyxml/tinyxml.h"
    3840//#include "../core/CoreIncludes.h"
    39 #include "misc/String.h"
    4041#include "../BaseObject.h"
    4142#include "../Tickable.h"
     
    5051    void addBullet(Bullet*);
    5152
    52     int getAmmunitionID(const String&);
     53    int getAmmunitionID(const std::string&);
    5354
    5455    int getNumberOfAmmos();
  • code/branches/FICN/src/orxonox/particle/ParticleInterface.cc

    r708 r715  
    4343  using namespace Ogre;
    4444
    45   ParticleInterface::ParticleInterface( SceneManager *sceneManager, String name, String templateName )
     45  ParticleInterface::ParticleInterface( SceneManager *sceneManager, std::string name, std::string templateName )
    4646  {
    4747    sceneManager_ = sceneManager;
  • code/branches/FICN/src/orxonox/particle/ParticleInterface.h

    r708 r715  
    11#ifndef _ParticleInterface_H__
    22#define _ParticleInterface_H__
     3
     4#include <string>
    35
    46// #include "ParticleInterface.h"
     
    1416
    1517#include "misc/Vector3.h"
    16 #include "misc/String.h"
    1718#include "misc/ColourValue.h"
    1819
     
    2526  public:
    2627
    27     ParticleInterface( Ogre::SceneManager *sceneManager, String name, String templateName );
     28    ParticleInterface( Ogre::SceneManager *sceneManager, std::string name, std::string templateName );
    2829    ~ParticleInterface( void );
    2930
  • code/branches/FICN/visual_studio/benixonox.vcproj

    r708 r715  
    177177                                >
    178178                        </File>
     179                        <File
     180                                RelativePath="..\src\orxonox\SpaceshipSteering.cc"
     181                                >
     182                        </File>
    179183                        <Filter
    180184                                Name="hud"
     
    307311                                >
    308312                        </File>
     313                        <File
     314                                RelativePath="..\src\orxonox\SpaceshipSteering.h"
     315                                >
     316                        </File>
    309317                        <Filter
    310318                                Name="hud"
Note: See TracChangeset for help on using the changeset viewer.