Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 30, 2015, 9:24:39 PM (8 years ago)
Author:
landauf
Message:

using strongly typed enum class in notifications.
NotificationListener::sendHelper (a network function) now uses the new enum instead of an unsigned int for the message-type. this is possible due to MultiType's new support for strongly typed enums.

File:
1 edited

Legend:

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

    r10817 r11003  
    6262    {
    6363        public:
    64             Notification(const std::string& message, const std::string& sender, notificationMessageType::Value type);
     64            Notification(const std::string& message, const std::string& sender, NotificationMessageType type);
    6565            virtual ~Notification();
    6666
     
    8989            @return Returns an enum with the type of the Notification.
    9090            */
    91             inline notificationMessageType::Value getType(void) const
     91            inline NotificationMessageType getType(void) const
    9292                { return this->type_; }
    9393
     
    9595            std::string message_; //!< The Notification message.
    9696            std::string sender_; //!< The sender of the notification.
    97             notificationMessageType::Value type_; //!< The type of the notification.
     97            NotificationMessageType type_; //!< The type of the notification.
    9898
    9999            void initialize(void); //!< Registers the object and sets some default values.
     
    128128            static NotificationManager& getInstance() { return Singleton<NotificationManager>::getInstance(); } // tolua_export
    129129
    130             virtual bool registerNotification(const std::string& message, const std::string& sender, notificationMessageType::Value type) override;
    131             virtual bool executeCommand(notificationCommand::Value command, const std::string& sender) override;
     130            virtual bool registerNotification(const std::string& message, const std::string& sender, NotificationMessageType type) override;
     131            virtual bool executeCommand(NotificationCommand command, const std::string& sender) override;
    132132
    133133            bool registerNotification(Notification* notification); // Registers a Notification within the NotificationManager.
Note: See TracChangeset for help on using the changeset viewer.