Changeset 8374 for code/branches/tutoriallevel2/src/orxonox/interfaces
- Timestamp:
- May 2, 2011, 10:20:45 AM (14 years ago)
- Location:
- code/branches/tutoriallevel2/src/orxonox/interfaces
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutoriallevel2/src/orxonox/interfaces/CMakeLists.txt
r7504 r8374 1 1 ADD_SOURCE_FILES(ORXONOX_SRC_FILES 2 2 InterfaceCompilation.cc 3 NotificationListener.cc 3 4 Pickupable.cc 4 5 PickupCarrier.cc -
code/branches/tutoriallevel2/src/orxonox/interfaces/InterfaceCompilation.cc
r7606 r8374 86 86 RegisterRootObject(Rewardable); 87 87 } 88 89 //----------------------------90 // NotificationListener91 //----------------------------92 NotificationListener::NotificationListener()93 {94 RegisterRootObject(NotificationListener);95 }96 88 } -
code/branches/tutoriallevel2/src/orxonox/interfaces/NotificationListener.h
r7552 r8374 67 67 NotificationListener(); 68 68 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; } 87 77 }; 88 78 }
Note: See TracChangeset
for help on using the changeset viewer.