- Timestamp:
- May 11, 2011, 10:55:30 PM (14 years ago)
- Location:
- code/branches/tutoriallevel2/src/modules/notifications
- Files:
-
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutoriallevel2/src/modules/notifications/CMakeLists.txt
r8446 r8449 1 1 SET_SOURCE_FILES(NOTIFICATIONS_SRC_FILES 2 Notification.cc3 2 NotificationDispatcher.cc 4 3 NotificationManager.cc -
code/branches/tutoriallevel2/src/modules/notifications/NotificationManager.cc
r8448 r8449 41 41 #include "interfaces/NotificationListener.h" 42 42 43 #include "Notification.h"44 43 #include "NotificationQueue.h" 45 44 #include "NotificationQueueCEGUI.h" … … 424 423 } 425 424 425 // Notification class 426 427 /** 428 @brief 429 Constructor. Creates a Notification with the input message and sender. 430 @param message 431 The message of the Notification. 432 @param sender 433 The sender of the Notification. 434 @param type 435 436 */ 437 Notification::Notification(const std::string& message, const std::string& sender, notificationMessageType::Value type) 438 { 439 this->initialize(); 440 this->message_ = message; 441 this->sender_ = sender; 442 this->type_ = type; 443 } 444 445 /** 446 @brief 447 Destructor. 448 */ 449 Notification::~Notification() 450 { 451 452 } 453 454 /** 455 @brief 456 Registers the object and sets some default values. 457 */ 458 void Notification::initialize(void) 459 { 460 this->message_.clear(); 461 this->sender_ = NotificationListener::NONE; 462 } 463 426 464 } -
code/branches/tutoriallevel2/src/modules/notifications/NotificationManager.h
r8448 r8449 42 42 #include <string> 43 43 44 #include "core/OrxonoxClass.h" 44 45 #include "util/Singleton.h" 45 46 #include "interfaces/NotificationListener.h" … … 47 48 namespace orxonox // tolua_export 48 49 { // tolua_export 50 51 /** 52 @brief 53 A Notification represents a short message used to inform the player about something that just happened. With the @ref orxonox::NotificationManager "NotificationManager" a Notification can be sent from any part of orxonox and is then displayed by the proper @ref orxonox::NotificationQueue "NotificationQueue(s)" (depending on which senders the specific @ref orxonox::NotificationQueue "NotificationQueues" accepts). 54 55 A Notification is just a data structure that is used internally by the Notifications module. 56 57 @author 58 Damian 'Mozork' Frick 59 60 @ingroup Notifications 61 */ 62 class _NotificationsExport Notification 63 { 64 public: 65 Notification(const std::string& message, const std::string& sender, notificationMessageType::Value type); 66 virtual ~Notification(); 67 68 /** 69 @brief Destroys the Notification. 70 */ 71 void destroy(void) 72 { delete this; } 73 74 /** 75 @brief Get the message of the Notification. 76 @return Returns the message of the Notification. 77 */ 78 inline const std::string & getMessage(void) const 79 { return this->message_; } 80 81 /** 82 @brief Get the sender of the Notification. 83 @return Returns the sender of the Notification. 84 */ 85 inline const std::string & getSender(void) const 86 { return this->sender_; } 87 88 /** 89 @brief Get the type of the Notification. 90 @return Returns an enum with the type of the Notification. 91 */ 92 inline notificationMessageType::Value getType(void) const 93 { return this->type_; } 94 95 private: 96 std::string message_; //!< The Notification message. 97 std::string sender_; //!< The sender of the notification. 98 notificationMessageType::Value type_; //!< The type of the notification. 99 100 void initialize(void); //!< Registers the object and sets some default values. 101 102 }; 49 103 50 104 /** -
code/branches/tutoriallevel2/src/modules/notifications/NotificationQueue.cc
r8448 r8449 39 39 #include "core/CoreIncludes.h" 40 40 #include "util/SubString.h" 41 42 #include "Notification.h"43 41 44 42 namespace orxonox -
code/branches/tutoriallevel2/src/modules/notifications/NotificationQueueCEGUI.cc
r8448 r8449 41 41 #include "core/LuaState.h" 42 42 #include "util/Convert.h" 43 44 #include "Notification.h"45 43 46 44 #include "ToluaBindNotifications.h"
Note: See TracChangeset
for help on using the changeset viewer.