- Timestamp:
- Mar 12, 2006, 3:00:04 PM (19 years ago)
- Location:
- branches/std/src
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/std/src/lib/graphics/effects/lense_flare.cc
r7216 r7218 131 131 * @param mode the mode character 132 132 */ 133 GLint LenseFlare:: charToFogMode(const char*mode)133 GLint LenseFlare::stringToFogMode(const std::string& mode) 134 134 {} 135 135 -
branches/std/src/lib/graphics/effects/lense_flare.h
r7216 r7218 43 43 44 44 private: 45 GLint charToFogMode(const char*mode);45 GLint stringToFogMode(const std::string& mode); 46 46 void setSourceVisibility(bool visibility) ; 47 47 -
branches/std/src/lib/graphics/importer/static_model.cc
r7210 r7218 499 499 * String is different from the argument addFace, 500 500 * in this, that the first Vertex/Normal/Texcoord is 1 instead of 0 501 * 502 * @TODO make it std::string conform 501 503 */ 502 504 bool StaticModel::addFace (const std::string& faceStringInput) -
branches/std/src/lib/graphics/importer/texture_sequence.cc
r6624 r7218 124 124 * @returns true on success 125 125 */ 126 bool TextureSequence::addFrame(const char*imageName)126 bool TextureSequence::addFrame(const std::string& imageName) 127 127 { 128 if (imageName == NULL) 129 return false; 130 131 SDL_Surface* addSurface = IMG_Load(imageName); 128 SDL_Surface* addSurface = IMG_Load(imageName.c_str()); 132 129 bool success = this->addFrame(addSurface); 133 130 delete addSurface; -
branches/std/src/lib/graphics/importer/texture_sequence.h
r7195 r7218 23 23 bool loadImageSeries(unsigned int count, ...); 24 24 bool loadImageSeries(unsigned int count, va_list textureNames); 25 bool addFrame(const char*image);25 bool addFrame(const std::string& image); 26 26 bool addFrame(SDL_Surface* surface); 27 27 bool addFrame(GLuint texture); -
branches/std/src/lib/gui/gl_gui/glgui_button.cc
r6287 r7218 54 54 } 55 55 56 void GLGuiButton::setLabel(const char*label)56 void GLGuiButton::setLabel(const std::string& label) 57 57 { 58 58 this->label->setText(label); -
branches/std/src/lib/gui/gl_gui/glgui_button.h
r5427 r7218 35 35 36 36 void init(); 37 void setLabel(const char*label);37 void setLabel(const std::string& label); 38 38 39 39 virtual void draw() const; -
branches/std/src/lib/gui/gl_gui/glgui_menu.h
r5391 r7218 24 24 void init(); 25 25 26 void addItem(const char*itemName);27 void removeItem(const char*itemName);26 void addItem(const std::string& itemName); 27 void removeItem(const std::string& itemName); 28 28 void removeItem(unsigned int itemNumber); 29 void selectItem(const char*itemName);29 void selectItem(const std::string& itemName); 30 30 void selectItem(unsigned int itemNumber); 31 31 -
branches/std/src/lib/gui/gl_gui/glgui_widget.h
r7062 r7218 47 47 virtual char* save() {}; 48 48 /** loads options of the Widget. @param loadString a string containing the Options */ 49 virtual void load(const char*loadString) {};49 virtual void load(const std::string& loadString) {}; 50 50 51 51 void show(); -
branches/std/src/lib/lang/base_object.cc
r7216 r7218 34 34 BaseObject::BaseObject() 35 35 { 36 this->classID = CL_BASE_OBJECT; 36 37 this->className = "BaseObject"; 37 this->classID = CL_BASE_OBJECT;38 38 39 39 this->objectName = ""; … … 78 78 * @param className the class name 79 79 */ 80 void BaseObject::setClassID(ClassID classID, const char*className)80 void BaseObject::setClassID(ClassID classID, const std::string& className) 81 81 { 82 82 //printf("%s(0x%.8X)->%s(0x%.8X)\n", this->className, this->classID, className, classID); … … 150 150 * @returns true if it is, false otherwise 151 151 */ 152 bool BaseObject::isA (const char*className) const152 bool BaseObject::isA (const std::string& className) const 153 153 { 154 154 ClassID classID = ClassList::StringToID(className); … … 163 163 * @returns true on match, false otherwise. 164 164 */ 165 bool BaseObject::operator==(const char*objectName)166 { 167 return ( objectName != NULL &&this->objectName == objectName);165 bool BaseObject::operator==(const std::string& objectName) 166 { 167 return (this->objectName == objectName); 168 168 } 169 169 -
branches/std/src/lib/lang/base_object.h
r7214 r7218 38 38 39 39 /** @returns the className of the corresponding Object */ 40 inline const char* getClassName() const { return this->className ; };40 inline const char* getClassName() const { return this->className.c_str(); }; 41 41 /** @returns the classID of the corresponding Object */ 42 42 inline int getClassID() const { return this->classID; }; … … 44 44 45 45 bool isA (ClassID classID) const; 46 bool isA (const char*className) const;46 bool isA (const std::string& className) const; 47 47 void whatIs() const; 48 48 49 bool operator==(const char*objectName);49 bool operator==(const std::string& objectName); 50 50 /** @param classID comparer for a ClassID @returns true on match, false otherwise */ 51 51 bool operator==(ClassID classID) { return this->isA(classID); }; … … 55 55 56 56 protected: 57 void setClassID(ClassID classID, const char*className);57 void setClassID(ClassID classID, const std::string& className); 58 58 59 59 private: 60 const char*className; //!< the name of the class60 std::string className; //!< the name of the class 61 61 long classID; //!< this is the id from the class_id.h enumeration 62 62 std::string objectName; //!< The name of this object -
branches/std/src/lib/shell/shell_command.cc
r7216 r7218 186 186 { 187 187 188 (*alias)->getCommand()->executor->execute(objectList->front(), executionString.substr(inputSplits.getOffset(1) , executionString.size())); /// TODO CHECK IF OK188 (*alias)->getCommand()->executor->execute(objectList->front(), executionString.substr(inputSplits.getOffset(1))); /// TODO CHECK IF OK 189 189 } 190 190 else … … 243 243 return false; 244 244 if (inputSplits.getCount() > fktPos+1) 245 (*cmdIT)->executor->execute(objectPointer, executionString.substr(inputSplits.getOffset(fktPos +1) , executionString.size())); /// TODO CHECK IF OK245 (*cmdIT)->executor->execute(objectPointer, executionString.substr(inputSplits.getOffset(fktPos +1))); /// TODO CHECK IF OK 246 246 else 247 247 (*cmdIT)->executor->execute(objectPointer, ""); -
branches/std/src/lib/util/executor/functor_list.h
r7216 r7218 74 74 //#define l_VECTOR_DEFAULT Vector(0,0,0) //!< Default value for a VECTOR 75 75 76 #define l_CSTRING_TYPE const char* //!< The type of a CSTRING77 #define l_CSTRING_FUNC isCString //!< The function to parse a CSTRING78 #define l_CSTRING_NAME "cstring" //!< The name of a CSTRING79 #define l_CSTRING_PARAM MT_STRING //!< the type of the parameter CSTRING80 #define l_CSTRING_DEFAULT "" //!< a default Value for an CSTRING81 82 76 #define l_STRING_TYPE const std::string& //!< The type of a STRING 83 77 #define l_STRING_FUNC isString //!< The function to parse a STRING 84 78 #define l_STRING_NAME "string" //!< The name of a STRING 85 #define l_STRING_PARAM MT_ CSTRING //!< the type of the parameter STRING79 #define l_STRING_PARAM MT_STRING //!< the type of the parameter STRING 86 80 #define l_STRING_DEFAULT "" //!< a default Value for an STRING 87 81 -
branches/std/src/lib/util/loading/resource_manager.cc
r7210 r7218 849 849 { 850 850 std::string homeDir; 851 std::string newName = name.substr(1 , name.size()-1);851 std::string newName = name.substr(1); 852 852 #ifdef __WIN32__ 853 853 homeDir = getenv("USERPROFILE"); -
branches/std/src/lib/util/multi_type.cc
r7214 r7218 55 55 break; 56 56 case MT_STRING: 57 case MT_CSTRING:58 57 this->storedString = ""; 59 58 break; -
branches/std/src/lib/util/multi_type.h
r7214 r7218 24 24 MT_EXT1 = 32, //!< An external Type. 25 25 MT_EXT2 = 64, //!< An external Type. 26 27 MT_CSTRING = 128, //!< An entire String.28 26 } MT_Type; 29 27 -
branches/std/src/subprojects/others/TTFtoIMG.cc
r6348 r7218 2 2 #include <SDL/SDL.h> 3 3 #include <SDL/SDL_ttf.h> 4 4 #include <string> 5 5 6 6 … … 16 16 17 17 18 void createAsciiImage(const char*fileName, unsigned int size)18 void createAsciiImage(const std::string& fileName, unsigned int size) 19 19 { 20 20 if (fontTTF == NULL) … … 68 68 } 69 69 } 70 SDL_SaveBMP(tmpSurf, fileName );70 SDL_SaveBMP(tmpSurf, fileName.c_str()); 71 71 SDL_FreeSurface(tmpSurf); 72 72 } … … 81 81 82 82 fontTTF = TTF_OpenFont(argv[1], renderSize); 83 83 84 84 createAsciiImage(argv[2], renderSize); 85 85 86 86 // delete fontTTF; 87 87 TTF_Quit(); -
branches/std/src/util/fast_factory.h
r7216 r7218 121 121 { 122 122 public: 123 static tFastFactory<T>* getFastFactory(ClassID classID, const char*fastFactoryName = NULL);123 static tFastFactory<T>* getFastFactory(ClassID classID, const std::string& fastFactoryName = NULL); 124 124 125 125 private: 126 tFastFactory(ClassID classID, const char*fastFactoryName);126 tFastFactory(ClassID classID, const std::string& fastFactoryName); 127 127 128 128 virtual void fabricate(); … … 136 136 */ 137 137 template<class T> 138 tFastFactory<T>::tFastFactory(ClassID classID, const char*fastFactoryName)138 tFastFactory<T>::tFastFactory(ClassID classID, const std::string& fastFactoryName) 139 139 : FastFactory(classID, fastFactoryName) 140 140 {} … … 147 147 */ 148 148 template<class T> 149 tFastFactory<T>* tFastFactory<T>::getFastFactory(ClassID classID, const char*fastFactoryName)149 tFastFactory<T>* tFastFactory<T>::getFastFactory(ClassID classID, const std::string& fastFactoryName) 150 150 { 151 151 tFastFactory<T>* tmpFac = NULL;
Note: See TracChangeset
for help on using the changeset viewer.