Changeset 7626 for code/branches/releasetodo/src
- Timestamp:
- Nov 6, 2010, 9:52:48 PM (14 years ago)
- Location:
- code/branches/releasetodo/src/orxonox
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/releasetodo/src/orxonox/LevelInfo.h
r7625 r7626 44 44 #include "core/OrxonoxClass.h" 45 45 46 namespace orxonox 47 { 46 namespace orxonox // tolua_export 47 { // tolua_export 48 48 49 49 /** … … 55 55 Damian 'Mozork' Frick 56 56 */ 57 class _OrxonoxExport LevelInfoItem : virtual public OrxonoxClass 58 { 57 class _OrxonoxExport LevelInfoItem // tolua_export 58 : virtual public OrxonoxClass 59 { // tolua_export 59 60 public: 60 61 LevelInfoItem(); //!< Default constructor. … … 72 73 @return Returns the name of the Level. 73 74 */ 74 inline const std::string& getName(void) 75 { return this->name_; } 75 inline const std::string& getName(void) { return this->name_; } // tolua_export 76 76 77 77 /** … … 85 85 @return Returns the description of the Level. 86 86 */ 87 inline const std::string& getDescription() const 88 { return this->description_; } 87 inline const std::string& getDescription() const { return this->description_; } // tolua_export 89 88 90 89 void setTags(const std::string& tags); //!< Set the tags the Level is tagged with. … … 101 100 @return Returns true if the Level is tagged with the input tag. 102 101 */ 103 bool hasTag(const std::string& tag) const 104 { return this->tags_.find(tag) != this->tags_.end(); } 102 inline bool hasTag(const std::string& tag) const { return this->tags_.find(tag) != this->tags_.end(); } // tolua_export 105 103 106 104 /** … … 108 106 @return Returns the XML-filename (including *.oxw extension) of the Level. 109 107 */ 110 inline const std::string& getXMLFilename(void) 111 { return this->xmlfilename_; } 108 inline const std::string& getXMLFilename(void) { return this->xmlfilename_; } // tolua_export 112 109 113 110 protected: … … 128 125 std::set<std::string> tags_; //!< The set of tags the Level is tagged with. 129 126 std::string tagsString_; //!< The comma-seperated string of all the tags the Level is tagged with. 130 }; 127 }; // tolua_export 131 128 132 129 /** … … 188 185 189 186 }; 190 } 187 } // tolua_export 191 188 192 189 #endif /* _LevelInfo_H__ */ -
code/branches/releasetodo/src/orxonox/LevelManager.cc
r7625 r7626 134 134 this->updateAvailableLevelList(); 135 135 136 COUT(0) << "Number of Levels: " << this->infos_.size() << std::endl;137 138 136 return this->availableLevels_.size(); 139 137 } 140 138 141 const std::string&LevelManager::getAvailableLevelListItem(unsigned int index) const139 LevelInfoItem* LevelManager::getAvailableLevelListItem(unsigned int index) const 142 140 { 143 141 if (index >= this->availableLevels_.size()) 144 return BLANKSTRING;142 return NULL; 145 143 else 146 144 { 147 145 std::map<std::string, LevelInfoItem*>::const_iterator it = this->infos_.find(this->availableLevels_[index]); 148 assert(it->second); 149 return it->second->getName(); 146 return it->second; 150 147 } 151 148 } … … 172 169 { 173 170 LevelInfoItem* info = item->copy(); 174 COUT(0) << "BUUUUUUUUUH: " << info->getName() << " | " << info->getXMLFilename() << " | " << it->substr(0, pos) << std::endl;175 171 if(info->getXMLFilename() == *it) 176 172 { -
code/branches/releasetodo/src/orxonox/LevelManager.h
r7625 r7626 61 61 const std::string& getDefaultLevel() const; //tolua_export 62 62 unsigned int getNumberOfLevels(void); //tolua_export 63 const std::string&getAvailableLevelListItem(unsigned int index) const; //tolua_export63 LevelInfoItem* getAvailableLevelListItem(unsigned int index) const; //tolua_export 64 64 65 65 static LevelManager& getInstance() { return Singleton<LevelManager>::getInstance(); } // tolua_export
Note: See TracChangeset
for help on using the changeset viewer.