Changeset 3366 for code/branches/resource/src/orxonox/objects/quest
- Timestamp:
- Jul 29, 2009, 10:27:10 PM (15 years ago)
- Location:
- code/branches/resource/src/orxonox/objects/quest
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/resource/src/orxonox/objects/quest/QuestDescription.h
r3196 r3366 54 54 Damian 'Mozork' Frick 55 55 */ 56 class _OrxonoxExport QuestDescription 56 class _OrxonoxExport QuestDescription : public BaseObject 57 { 57 58 // tolua_end 58 : public BaseObject59 { // tolua_export60 59 public: 61 60 QuestDescription(BaseObject* creator); -
code/branches/resource/src/orxonox/objects/quest/QuestManager.cc
r3349 r3366 47 47 { 48 48 //! Pointer to the current (and single) instance of this class. 49 /*static*/ QuestManager* QuestManager::singleton Ref_s = NULL;49 /*static*/ QuestManager* QuestManager::singletonPtr_s = NULL; 50 50 51 51 /** … … 58 58 { 59 59 RegisterRootObject(QuestManager); 60 61 assert(singletonRef_s == 0);62 singletonRef_s = this;63 60 } 64 61 … … 70 67 { 71 68 72 }73 74 /**75 @brief76 Returns a reference to the current (and single) instance of the QuestManager, and creates one if there isn't one to begin with.77 @return78 Returns a reference to the single instance of the Quest Manager.79 */80 /*static*/ QuestManager & QuestManager::getInstance()81 {82 assert(singletonRef_s);83 return *singletonRef_s;84 69 } 85 70 -
code/branches/resource/src/orxonox/objects/quest/QuestManager.h
r3196 r3366 40 40 #include <map> 41 41 #include <string> 42 43 #include "util/Singleton.h" 42 44 #include "core/OrxonoxClass.h" 43 45 … … 71 73 Damian 'Mozork' Frick 72 74 */ 73 class _OrxonoxExport QuestManager 74 // tolua_end 75 : public OrxonoxClass 76 // tolua_begin 75 class _OrxonoxExport QuestManager : public Singleton<QuestManager>, public orxonox::OrxonoxClass 77 76 { 78 77 // tolua_end 78 friend class Singleton<QuestManager>; 79 79 public: 80 80 QuestManager(); 81 81 virtual ~QuestManager(); 82 82 83 static QuestManager& getInstance(); // tolua_export //!< Returns a reference to the single instance of the Quest Manager. 83 //! Returns a reference to the single instance of the Quest Manager. 84 static QuestManager& getInstance() { return Singleton<QuestManager>::getInstance(); } // tolua_export 84 85 85 86 bool registerQuest(Quest* quest); //!< Registers a Quest in the QuestManager. … … 92 93 93 94 private: 94 static QuestManager* singleton Ref_s;95 static QuestManager* singletonPtr_s; 95 96 96 97 std::map<std::string, Quest*> questMap_; //!< All Quests registered by their id's.
Note: See TracChangeset
for help on using the changeset viewer.