Changeset 6406 for code/branches/presentation2/src/orxonox/MoodManager.h
- Timestamp:
- Dec 23, 2009, 8:45:56 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/MoodManager.h
r6370 r6406 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <cassert>35 #include <list>36 34 #include <string> 37 38 35 #include "util/Singleton.h" 39 36 #include "core/OrxonoxClass.h" 40 37 41 // tolua_begin42 38 namespace orxonox 43 39 { 44 class _OrxonoxExport MoodManager 45 // tolua_end 46 : public Singleton<MoodManager>, public OrxonoxClass 47 { // tolua_export 40 class _OrxonoxExport MoodListener : virtual public OrxonoxClass 41 { 42 friend class MoodManager; 43 44 protected: 45 MoodListener(); 46 virtual ~MoodListener() {} 47 48 const std::string& getMood() const { return mood_s; } 49 50 private: 51 virtual void moodChanged(const std::string& mood) = 0; 52 53 static void changedMood(const std::string& mood); 54 static std::string mood_s; 55 }; 56 57 class _OrxonoxExport MoodManager : public Singleton<MoodManager>, public OrxonoxClass 58 { 48 59 friend class Singleton<MoodManager>; 49 60 public: 50 61 MoodManager(); 51 ~MoodManager();52 62 53 63 void setConfigValues(); 54 64 55 65 void setMood(const std::string& mood); 56 const std::string& getMood();66 inline const std::string& getMood() const { return this->mood_; } 57 67 58 static MoodManager& getInstance() { return Singleton<MoodManager>::getInstance(); } // tolua_export68 static MoodManager& getInstance() { return Singleton<MoodManager>::getInstance(); } 59 69 60 70 private: 71 ~MoodManager() {} 61 72 void checkMoodValidity(); 62 73 63 74 // config values 64 75 std::string mood_; 65 std::string moodOld_;66 76 67 77 static MoodManager* singletonPtr_s; 68 }; // tolua_export69 } // tolua_export78 }; 79 } 70 80 71 81 #endif /* _MoodManager_H__ */
Note: See TracChangeset
for help on using the changeset viewer.