Changeset 7221 in orxonox.OLD for trunk/src/util/track
- Timestamp:
- Mar 15, 2006, 3:10:45 PM (19 years ago)
- Location:
- trunk/src/util/track
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/track/track_manager.cc
r7193 r7221 123 123 * @returns The TrackElement if Found, NULL otherwise. 124 124 */ 125 TrackElement* TrackElement::findByName(const char*trackName)125 TrackElement* TrackElement::findByName(const std::string& trackName) 126 126 { 127 127 // return if Found. … … 532 532 * @param trackName the Name of the Track to work on 533 533 */ 534 void TrackManager::workOnS(const char*trackName)534 void TrackManager::workOnS(const std::string& trackName) 535 535 { 536 536 TrackElement* tmpElem = this->firstTrackElem->findByName(trackName); … … 657 657 @todo this must be better 658 658 */ 659 void TrackManager::setSavePointS(const char*nextElementName)659 void TrackManager::setSavePointS(const std::string& nextElementName) 660 660 { 661 661 this->setSavePoint(NULL); … … 725 725 for(int i = 0; i < count; i++) 726 726 { 727 this->firstTrackElem->findByID(trackIDs[i])->setName(va_arg(name, const char*));727 this->firstTrackElem->findByID(trackIDs[i])->setName(va_arg(name, const std::string&)); 728 728 } 729 729 va_end(name); … … 734 734 \see TrackManager::fork(unsigned int count, ...) 735 735 */ 736 void TrackManager::forkS(const char*forkString)736 void TrackManager::forkS(const std::string& forkString) 737 737 { 738 738 SubString strings(forkString, ','); … … 860 860 for(int i = 0; i < count; i++) 861 861 { 862 const char*name = va_arg (NAME, char*);862 const std::string& name = va_arg (NAME, char*); 863 863 TrackElement* tmpElem = this->firstTrackElem->findByName(name); 864 864 if (tmpElem) … … 875 875 \see void TrackManager::join(unsigned int count, ...) 876 876 */ 877 void TrackManager::joinS(const char*joinString)877 void TrackManager::joinS(const std::string& joinString) 878 878 { 879 879 SubString strings(joinString, ','); … … 884 884 for(unsigned int i = 0; i < strings.getCount(); i++) 885 885 { 886 TrackElement* tmpElem = this->firstTrackElem->findByName(strings.getString(i) );886 TrackElement* tmpElem = this->firstTrackElem->findByName(strings.getString(i).c_str()); 887 887 if (tmpElem != NULL) 888 888 trackIDs[i] = tmpElem->ID; 889 889 else 890 890 { 891 PRINTF(1)("Trying to join a Track, of which the name does not exist: %s\n", strings.getString(i) );891 PRINTF(1)("Trying to join a Track, of which the name does not exist: %s\n", strings.getString(i).c_str()); 892 892 trackIDs[i] = -1; 893 893 } -
trunk/src/util/track/track_manager.h
r7130 r7221 46 46 47 47 TrackElement* findByID(unsigned int trackID); 48 TrackElement* findByName(const char*trackName);48 TrackElement* findByName(const std::string& trackName); 49 49 bool backLoopCheck() const; 50 50 … … 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 */ … … 153 153 void addHotPoint(float x, float y, float z); 154 154 int addHotPointV(Vector newPoint, TrackElement* trackElem = NULL); 155 void setSavePointS(const char*nextElementName);155 void setSavePointS(const std::string& nextElementName); 156 156 void setSavePoint(TrackElement* trackElem = NULL); 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); 162 162 void condition(CONDITION cond, void* subject, TrackElement* trackElem = NULL); 163 163 void join(unsigned int count, ...); 164 void joinS(const char*joinString);164 void joinS(const std::string& joinString); 165 165 void joinS(unsigned int cound, ...); 166 166 void joinV(unsigned int count, int* trackIDs);
Note: See TracChangeset
for help on using the changeset viewer.