Changeset 7216 in orxonox.OLD for branches/std/src/util
- Timestamp:
- Mar 12, 2006, 8:54:30 AM (19 years ago)
- Location:
- branches/std/src/util
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/std/src/util/Makefile.am
r7193 r7216 15 15 animation/animation_player.cc \ 16 16 \ 17 track/pilot_node.cc \ 18 track/track_manager.cc \ 17 track/pilot_node.cc 18 19 # track/track_manager.cc \ 19 20 track/track_node.cc 20 21 … … 31 32 animation/t_animation.h \ 32 33 \ 33 track/pilot_node.h \ 34 track/track_manager.h \ 34 track/pilot_node.h 35 36 # track/track_manager.h \ 35 37 track/track_node.h -
branches/std/src/util/fast_factory.cc
r5750 r7216 29 29 * @return a new FastFactory 30 30 */ 31 FastFactory::FastFactory (ClassID classID, const char*fastFactoryName)31 FastFactory::FastFactory (ClassID classID, const std::string& fastFactoryName) 32 32 { 33 33 this->setClassID(CL_FAST_FACTORY, "FastFactory"); … … 119 119 * @returns true if found, false otherwise. 120 120 */ 121 FastFactory* FastFactory::searchFastFactory(const char*fastFactoryName)121 FastFactory* FastFactory::searchFastFactory(const std::string& fastFactoryName) 122 122 { 123 123 if (FastFactory::first == NULL) … … 128 128 while (tmpFac != NULL) 129 129 { 130 if ( strcmp(tmpFac->getName(), fastFactoryName))130 if (fastFactoryName == tmpFac->getName()) 131 131 return tmpFac; 132 132 tmpFac = tmpFac->next; -
branches/std/src/util/fast_factory.h
r5447 r7216 80 80 81 81 static FastFactory* searchFastFactory(ClassID classID); 82 static FastFactory* searchFastFactory(const char*fastFactoryName);82 static FastFactory* searchFastFactory(const std::string& fastFactoryName); 83 83 84 84 ClassID getStoredID() const { return this->storedClassID; }; 85 85 86 86 protected: 87 FastFactory (ClassID classID, const char* fastFactoryName = NULL);87 FastFactory (ClassID classID, const std::string& fastFactoryName = ""); 88 88 89 89 /** sets the Next factory in the list @param nextFactory the next factory */ -
branches/std/src/util/multiplayer_team_deathmatch.cc
r7193 r7216 92 92 93 93 94 void MultiplayerTeamDeathmatch::setDeathScreen(const char*imageName)94 void MultiplayerTeamDeathmatch::setDeathScreen(const std::string& imageName) 95 95 { 96 96 if( this->deathScreen) -
branches/std/src/util/multiplayer_team_deathmatch.h
r7044 r7216 38 38 inline void setDeathPenaltyTimeout(float time) { this->deathTimeout = time; } 39 39 inline void setMaxKills(int kills) { this->maxKills = kills; } 40 void setDeathScreen(const char*imageName);40 void setDeathScreen(const std::string& imageName); 41 41 42 42 protected: -
branches/std/src/util/object_manager.cc
r7198 r7216 97 97 * this function also does a transformation from omList as char* to OM_LIST. 98 98 */ 99 void ObjectManager::toList (WorldEntity* entity, const char*omList)99 void ObjectManager::toList (WorldEntity* entity, const std::string& omList) 100 100 { 101 101 this->toList(entity, ObjectManager::StringToOMList(omList)); … … 153 153 * @param level: level 0: only show list info; level 1: also show entities and their names. 154 154 */ 155 void ObjectManager::debug(const char*listName, unsigned int level)155 void ObjectManager::debug(const std::string& listName, unsigned int level) 156 156 { 157 157 PRINT(0)("=================================\n"); 158 158 PRINT(0)("=ObjectManager-DEBUG=============\n"); 159 159 PRINT(0)("=================================\n"); 160 if (listName == NULL || listName[0] == '\0')160 if (listName.empty()) 161 161 for (unsigned int i = 0; i < OM_SIZE; ++i) 162 162 debug((OM_LIST) i, level); … … 189 189 * @returns the OM_LIST transformed from listName. or the default, if not found or NULL. 190 190 */ 191 OM_LIST ObjectManager::StringToOMList(const char*listName)192 { 193 if (unlikely(listName == NULL)) return OM_DEFAULT_LIST;191 OM_LIST ObjectManager::StringToOMList(const std::string& listName) 192 { 193 if (unlikely(listName.empty())) return OM_DEFAULT_LIST; 194 194 195 195 for(unsigned int i = 0; i < OM_SIZE; ++i) { 196 if( !strcmp(listName, ObjectManager::objectManagerListNames[i])) {196 if(listName == ObjectManager::objectManagerListNames[i]) { 197 197 return (OM_LIST)i; 198 198 } -
branches/std/src/util/object_manager.h
r6142 r7216 76 76 77 77 void toList (WorldEntity* entity, OM_LIST omList = OM_DEFAULT_LIST); 78 void toList (WorldEntity* entity, const char*omList);78 void toList (WorldEntity* entity, const std::string& omList); 79 79 80 80 … … 85 85 86 86 void debug(OM_LIST omList, unsigned int level = 0) const; 87 void debug(const char* listName = NULL, unsigned int level = 0);87 void debug(const std::string& listName = "", unsigned int level = 0); 88 88 89 static OM_LIST StringToOMList(const char*listName);89 static OM_LIST StringToOMList(const std::string& listName); 90 90 static const char* OMListToString(OM_LIST omList); 91 91 -
branches/std/src/util/track/track_manager.h
r7130 r7216 142 142 // Methods to change the Path (initialisation) 143 143 void workOn(unsigned int trackID); 144 void workOnS(const char*trackName);144 void workOnS(const std::string& trackName); 145 145 146 146 /** \see setCurveType(CurveType curveType, TrackElement* trackElem); @param curveType the type of the Curve */ … … 157 157 void fork(unsigned int count, ...); 158 158 void forkS(unsigned int count, ...); 159 void forkS(const char*forkString);159 void forkS(const std::string& forkString); 160 160 void forkV(unsigned int count, int* trackIDs, char** trackNames, TrackElement* trackElem = NULL); 161 161 void condition(unsigned int trackID, CONDITION cond, void* subject);
Note: See TracChangeset
for help on using the changeset viewer.