Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 11, 2011, 10:55:30 PM (13 years ago)
Author:
dafrick
Message:

Moving the Notification class int NotificationManager, since it is only a container now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/tutoriallevel2/src/modules/notifications/NotificationManager.h

    r8448 r8449  
    4242#include <string>
    4343
     44#include "core/OrxonoxClass.h"
    4445#include "util/Singleton.h"
    4546#include "interfaces/NotificationListener.h"
     
    4748namespace orxonox // tolua_export
    4849{ // 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    };
    49103
    50104    /**
Note: See TracChangeset for help on using the changeset viewer.