- Timestamp:
- Nov 12, 2008, 1:29:33 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem2/src/orxonox/objects/quest/QuestManager.cc
r2159 r2191 44 44 namespace orxonox { 45 45 46 //! All quests registered by their id's.46 //! All Quests registered by their id's. 47 47 std::map<std::string, Quest*> QuestManager::questMap_s; 48 //! All hints registered by their id's.48 //! All QuestHints registered by their id's. 49 49 std::map<std::string, QuestHint*> QuestManager::hintMap_s; 50 50 … … 69 69 /** 70 70 @brief 71 Registers a quest with the QuestManager to make it globally accessable.71 Registers a Quest with the QuestManager to make it globally accessable. 72 72 Uses it's id to make sure to be able to be identify and retrieve it later. 73 73 @param quest 74 The quest that is to be registered.74 The Quest that is to be registered. 75 75 @return 76 76 Returns true if successful, false if not. … … 85 85 86 86 std::pair<std::map<std::string, Quest*>::iterator,bool> result; 87 result = questMap_s.insert( std::pair<std::string,Quest*>(quest->getId(),quest) ); //!< Inserting the quest.87 result = questMap_s.insert( std::pair<std::string,Quest*>(quest->getId(),quest) ); //!< Inserting the Quest. 88 88 89 89 if(result.second) //!< If inserting was a success. … … 117 117 118 118 std::pair<std::map<std::string, QuestHint*>::iterator,bool> result; 119 result = hintMap_s.insert ( std::pair<std::string,QuestHint*>(hint->getId(),hint) ); //!< Inserting the hint.119 result = hintMap_s.insert ( std::pair<std::string,QuestHint*>(hint->getId(),hint) ); //!< Inserting the QuestHSint. 120 120 121 121 if(result.second) //!< If inserting was a success. … … 133 133 /** 134 134 @brief 135 Finds a quest with the given id.135 Finds a Quest with the given id. 136 136 @param questId 137 The id of the quest sought for.138 @return 139 Returns a reference to the quest with the input id.140 Returns NULL if there is no quest with the given questId.137 The id of the Quest sought for. 138 @return 139 Returns a pointer to the Quest with the input id. 140 Returns NULL if there is no Quest with the given questId. 141 141 @throws 142 142 Throws an exception if the given questId is invalid. … … 151 151 Quest* quest; 152 152 std::map<std::string, Quest*>::iterator it = questMap_s.find(questId); 153 if (it != questMap_s.end()) //!< If the quest is registered.153 if (it != questMap_s.end()) //!< If the Quest is registered. 154 154 { 155 155 quest = it->second; … … 167 167 /** 168 168 @brief 169 Finds a hint with the given id.169 Finds a QuestHint with the given id. 170 170 @param hintId 171 The id of the hint sought for.172 @return 173 Returns a reference to the hint with the input id.174 Returns NULL if there is no hint with the given hintId.171 The id of the QuestHint sought for. 172 @return 173 Returns a pointer to the QuestHint with the input id. 174 Returns NULL if there is no QuestHint with the given hintId. 175 175 @throws 176 176 Throws an exception if the given hintId is invalid. … … 185 185 QuestHint* hint; 186 186 std::map<std::string, QuestHint*>::iterator it = hintMap_s.find(hintId); 187 if (it != hintMap_s.end()) //!< If the hint is registered.187 if (it != hintMap_s.end()) //!< If the QuestHint is registered. 188 188 { 189 189 hint = it->second;
Note: See TracChangeset
for help on using the changeset viewer.