Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 2, 2011, 10:20:45 AM (13 years ago)
Author:
dafrick
Message:

Changes in notifications module structure. Notifications can now be sent through the NotificationListener, meaning, they can be sent from anywhere within orxonox (and the modules of course).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/tutoriallevel2/src/orxonox/interfaces/NotificationListener.h

    r7552 r8374  
    6767            NotificationListener();
    6868            virtual ~NotificationListener() {}
    69 
    70             /**
    71             @brief Get the senders that are targets of this NotificationListener.
    72             @return Returns the set of senders that are targets of this NotificationListener.
    73             */
    74             virtual const std::set<std::string> & getTargetsSet(void) = 0;
    75 
    76             /**
    77             @brief Updates the whole NotificationListener.
    78                    This is called by the @ref orxonox::NotificationManager "NotificationManager" when the @ref orxonox::Notification "Notifications" have changed so much, that the NotificationListener may have to re-initialize his operations.
    79             */
    80             virtual void update(void) = 0;
    81             /**
    82             @brief Updates the NotificationListener, when a new Notification has come in at the specified time.
    83             @param notification A pointer to the @ref orxonox::Notification "Notification".
    84             @param time The time the @ref orxonox::Notification "Notification" has come in.
    85             */
    86             virtual void update(Notification* notification, const std::time_t & time) = 0;
     69           
     70            static const std::string ALL; //!< Static string to indicate a sender that sends to all NotificationListeners.
     71            static const std::string NONE; //!< Static string to indicare a sender that sends to no specific NotificationListener.
     72           
     73            static void sendNotification(const std::string& message, unsigned int clientId, const std::string& sender = NotificationListener::NONE, bool isLocal = false);
     74           
     75            virtual bool registerNotification(const std::string& message, const std::string& sender)
     76                { return false; }
    8777    };
    8878}
Note: See TracChangeset for help on using the changeset viewer.