Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/core/Identifier.h

    r700 r708  
    5252#define _Identifier_H__
    5353
    54 #include <string>
    5554#include <map>
    5655
    5756#include "CorePrereqs.h"
    5857
     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 std::string& getName() const { return this->name_; }
     114            inline const 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 std::string& varname)
     132            inline ConfigValueContainer* getConfigValueContainer(const 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 std::string& varname, ConfigValueContainer* container)
     136            inline void setConfigValueContainer(const String& varname, ConfigValueContainer* container)
    137137                { this->configValues_[varname] = container; }
    138138
    139             static std::map<std::string, Identifier*>& getIdentifierMap();
     139            static std::map<String, Identifier*>& getIdentifierMap();
    140140
    141141        private:
     
    166166            IdentifierList* children_;                                  //!< The Children of the class the Identifier belongs to
    167167
    168             std::string name_;                                          //!< The name of the class the Identifier belongs to
     168            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<std::string, ConfigValueContainer*> configValues_; //!< A map to link the string of configurable variables with their ConfigValueContainer
     174            std::map<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 std::string& name, bool bRootClass);
     191            static ClassIdentifier<T>* registerClass(const IdentifierList* parents, const String& name, bool bRootClass);
    192192            static void addObject(T* object);
    193193            static ClassIdentifier<T>* getIdentifier();
    194             void setName(const std::string& name);
     194            void setName(const String& name);
    195195
    196196        private:
     
    221221    */
    222222    template <class T>
    223     ClassIdentifier<T>* ClassIdentifier<T>::registerClass(const IdentifierList* parents, const std::string& name, bool bRootClass)
     223    ClassIdentifier<T>* ClassIdentifier<T>::registerClass(const IdentifierList* parents, const 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 std::string& name)
     267    void ClassIdentifier<T>::setName(const 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<std::string, Identifier*>(name, this));
     273            this->getIdentifierMap().insert(std::pair<String, Identifier*>(name, this));
    274274            this->bSetName_ = true;
    275275        }
Note: See TracChangeset for help on using the changeset viewer.