Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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..
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.